str.substring
The part of source from begin_pos (0 = first character) up to but not including end_pos (default: to the end).
str.substring(source: string, begin_pos: int, end_pos: int = na) -> string
Parameters
sourcestring: The text; na gives na.begin_posint: Index of the first character kept, 0 = the first; below 0 counts as 0.end_posint: Index after the last character kept (default: to the end); before begin_pos gives "".
Example
str.substring("ESZ6", 0, 2) // "ES"