mid. Getting substring from a specified position

^string.mid(P;N)
^string.mid(P)

The method returns substring which starts from position
P and has length specified as N (if N is not given, the method will return the substring from position P and to the end of the string). P is counted from zero position. If value of P+N equals more that the length of the string the method will return all characters of the string after P.

Example

$str[Strangers in the night…]
^str.mid(2;19)


The code will output
: rangers in the nigh


Copyright © 1997–2021 Art. Lebedev Studio | http://www.artlebedev.com Last updated: 21.09.2007