left, right. Getting substring on the left and on the right


These methods return
N first or last characters of the string respectively. If value of N is more than the string's length, the method will output the whole string.
^string.left(-1) call will output the whole string.   [3.4.4]


$str[Strangers in the night…]
^str.left(7) ^str.right(9)

The code will output:
Strange night

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