string.slice)
SPL substring rules are intentionally not Python’s s[a:b].
Bounds use a mixed convention so short examples read naturally.
string.slice(lo, hi, string)string.sliceMax() for the upper bound:string.slice(2, string.sliceMax(), "hello") → "llo".
string.sliceMin() for the lower bound:string.slice(string.sliceMin(), 2, "hello") → "hel".
string.slice(string.sliceMin(), string.sliceMax(), s).
text[(lo-1) .. hi] in inclusive character terms."hello": string.slice(2, 4, "hello") → characters from position 2 through index 4 (0-based inclusive) → "ello".
[var] <- sl(lo, hi);
Parses as “read the current string in var, slice with the same string.slice rules, assign back”.
Requires var to already hold a string.
txt.setVar("hello");
[txt] <- sl(2, string.sliceMax());
print.string(txt); # llo
Implementation: someProgrammingLanguage/main.py (_spl_string_slice),
searchable as string.slice / string.sliceMin / string.sliceMax in the reference table.