Starting from position p, returns the next m characters of a string expression.
SubStr[$](a$, p% [,m% [,char$]])
a$, char$:sexp
m%, p%:integer expression
SubStr$(a$, p%, m%, char$) returns, starting from position p% (inclusive), up to m% characters of the string expression a$. If m% is not given, the whole string from position p% is returned. If m% specifies more characters than are present in a$, then the returned string is filled with character char$.
Debug.Show
Local a$
a$ = "GFA Software Technologies GmbH"
Trace SubStr$(a$, 5, 9) // Software
Trace SubStr(a$, 1, 3) // GFA
Trace SubStr(a$, 5) // Soft...
Trace SubStr(a$, 5, 35, "*") // Software Technologies GmbH*********
Without the optional $ character the function still returns a String data type and not a Variant.
String, Left$(), Right$(), Mid()
{Created by Sjouke Hamstra; Last updated: 23/10/2014 by James Gaite}