codePointIterator

Creates an iterator over the Unicode code points of the string starting at the specified char-based position index. The returned iterator allows traversal of code points in both forward and reverse directions.

Since Kotlin

2.5

Return

A CodePointIndexedIterator for traversing the string's Unicode code points from the specified index.

Parameters

index

The index in the string to begin iteration. Must be in the range 0..length.

Throws

if index is not within the range 0..length.


Creates an iterator over the Unicode code points of the char sequence starting at the specified char-based position index. The returned iterator allows traversal of code points in both forward and reverse directions.

Since Kotlin

2.5

Return

A CodePointIndexedIterator for traversing the Unicode code points in the char sequence from the specified index.

Parameters

index

The index in the char sequence to begin iteration. Must be in the range 0..length.

Throws

if index is not within the range 0..length.


Creates an iterator over the Unicode code points of this char array at the specified char-based position index. The returned iterator allows traversal of code points in both forward and reverse directions.

Since Kotlin

2.5

Return

A CodePointIndexedIterator for traversing the Unicode code points in the char array from the specified index.

Parameters

index

The index in the array to begin iteration. Must be in the range 0..size.

Throws

if index is not within the range 0..size.


Creates an iterator over the Unicode code points of the specified range of this char array. The returned iterator allows traversal of code points in both forward and reverse directions.

The range of array indices wherein the iteration is constrained is defined by the startIndex (inclusive) and endIndex (exclusive) parameters. The iteration starts at the beginning of the array range, namely at startIndex. By default, the entire char array is iterated.

Since Kotlin

2.5

Return

A CodePointIndexedIterator for traversing the Unicode code points in the specified range of the char array.

Parameters

startIndex

The beginning of the array range, inclusive. Defaults to 0.

endIndex

The ending of the array range, exclusive. Defaults to the size of the char array.

Throws

If startIndex or endIndex is out of the valid range 0..size or endIndex < startIndex.


Creates an iterator over the Unicode code points of the specified range of this char array at the specified char-based position index. The returned iterator allows traversal of code points in both forward and reverse directions.

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.

Since Kotlin

2.5

Return

A CodePointIndexedIterator for traversing the Unicode code points in the range of the char array from the specified index.

Parameters

index

The index in the array to begin iteration. Must be in the range startIndex..endIndex.

startIndex

The beginning of the array range, inclusive. Defaults to 0.

endIndex

The ending of the array range, exclusive. Defaults to the size of the char array.

Throws

if index is not within the range startIndex..endIndex.