Extracts a smaller string out of a larger string using the given indices.
| SUBSTRING() | astring=String [start=Integer] [length=Integer] | Select a string of a specified length from a given starting position. |
example:
# pick the user name from this string
>> printn substring("Run: no, User: A Neutron", 16)
A Neutron
# Select just the initial
>> printn substring("Run: no, User: A Neutron", 16, 1)
A
Note: if the length value is null, the rest of the string is returned.
![]()
The Substring() command extracts a smaller string from a larger string. Characters in the string are selected by an index starting at 1 for the first character position in the string.
Atring (String)
The string from which a sub-string is to be selected
Start (Integer)
Starting position of the sub-string to take.
length (Integer)
The length of the sub-string to take.
RESULT = (String)
The sub-string selected.