public static _slice(text as String, start as Int, stop as Int, sliceStep as Int, hasStart as Boolean, hasStop as Boolean) as String:
Internal helper used by the compiler to implement slice syntax.
The hasStart and hasStop flags preserve omitted bounds from source expressions such as text[:5], text[3:] or text[::-1].
The sliced string.
assert String._slice("Hello World", 0, 5, 1, true, true) == "Hello"