Specifications

Saturn String Manipulation Functions 6-5
Psy-Q Development System
SUBSTR
Description This directive assigns a value to a symbol; the value is a sub-string of a previously
specified text string, defined by the start and end parameters. The start and end
parameters will default to the start and end of the string, if omitted.
Syntax symbol SUBSTR [start],[end],string
See Also INSTR, EQUS
Remarks When assigning a sub-string to a symbol, the SUBSTR directive starts numbering the
characters in the source text from one.
Examples Message equs "A short Sample String"
Part1 substr 9,14,"\Message"
Part2 substr 16,,"\Message"
Part3 substr ,7,"\Message"
Part4 substr ,,"\Message"
where Part1 equals Sample
Part2 equals String
Part3 equals A short
The last statement is equivalent to an EQUS assigning the whole of the original
string to Part4.