City17
4 years
returns a new substring from the interval [start, end) - inclusive, exclusive. Positions are zero-indexed. For empty or invalid out-of-bounds values returns an empty string "".
For start>end returns substring beginning with start until the actual end of string.
For start<0 returns an empty string.
Examples (Lua):
For start>end returns substring beginning with start until the actual end of string.
For start<0 returns an empty string.
Examples (Lua):
Code Select
1 SubString("abc", 0, 0) -> ""2 SubString("abc", 0, 1) -> "a"3 SubString("abc", 2, 3) -> "c"4 SubString("abc", 0, 3) -> "abc"5 SubString("abcdef", 2, 0) -> "cdef"