string :str-sub ( string $STR , int $START , int $LENGTH )
string :str-sub ( string $STR , int $START )
Returns a portion of the original string, starting at character START and counting at most LENGTH characters.
If LENGTH is omitted, returns everything from the START-th character to the end of the string.
# :str-sub example :set &NAME s'' :writeln s"What's your name?" :readln &NAME !if :eq s'v' :str-sub $NAME i2 i1 :writeln s"The second letter of your name is 'v'!" :writeln s"Ain't that interesting?" !else :writeln s'Good evening, ' $NAME s'.' !fi
wikipage modified on 2014/0601/2317