The starting string
The index of the first grapheme cluster to include. Negative values count back from the end
OptionalindexEnd: numberThe index of the first grapheme cluster to exclude. Negative values count back from the end. A range that ends before it starts yields an empty string
A new string containing the extracted section of the string
This function mirrors the
slicefunction from the JavaScript Standard String object. It operates on grapheme clusters instead of UTF-16 code units.Extracts a section of the string and returns it as a new string, without modifying the original.