forEachCodePoint
Executes the given action on each Unicode code point of this string.
This function iterates through the string, extracting code points using codePointAt function and passing them to the specified action. The iteration position is then advanced to the next code point.
Any unpaired surrogate chars are passed to the action as individual code points.
Since Kotlin
2.5See also
Executes the given action on each Unicode code point of this char sequence.
This function iterates through the char sequence, extracting code points using codePointAt function and passing them to the specified action. The iteration position is then advanced to the next code point.
Any unpaired surrogate chars are passed to the action as individual code points.
Since Kotlin
2.5See also
Executes the given action on each Unicode code point in the specified range of this char array.
This function iterates through the char array, extracting code points using codePointAt function and passing them to the specified action. The iteration position is then advanced to the next code point.
The range of array indices wherein the iteration is constrained is defined by the startIndex (inclusive) and endIndex (exclusive) parameters. By default, the entire char array is iterated.
Any unpaired surrogate chars are passed to the action as individual code points.
Since Kotlin
2.5Parameters
The beginning of the array range, inclusive. Defaults to 0.
The ending of the array range, exclusive. Defaults to the size of the char array.
See also
Throws
If startIndex or endIndex is out of the valid range 0..charArray.size or endIndex < startIndex.