Name _[_], substr
Definition `_[_]` : overloaded. (in types.l)
(s:val(string)) [ (i:val(int)) ] : expr(char).
(s:val(string)) [ (r:val(range(int))) ] : expr(string)).
substr (s:val(string),low:val(int),highplus1:val(int)) : expr(string)
Example "Hello world"[4 to 10]
Defined in strings.l, bitfields.l
Implementation icode, lard
Infix _[_] : infix(190,none).
Description Select either the i'th character of string V, or the substring of s with the indices specified by the range r. The indices may be in either order for string[range(int)]. substr is similar to the range extraction operator but takes indices in order with the highplus1 index one greater than the highest character index required. substr is capable of returning an empty string.