codePointAt

Returns the Unicode code point at the specified index of this string.

The index refers to the char-based position in the string, and the returned value is the code point represented by the character or surrogate pair (a high surrogate char followed by a low surrogate char) at that position.

If the index points to an unpaired surrogate character, for example, in the middle of a surrogate pair, the code point with the code of that only one character is returned.

Since Kotlin

2.5

Return

the Unicode code point as a CodePoint corresponding to the character or surrogate pair at the given index.

Parameters

index

the char-based position in the string for which the Unicode code point is to be returned, must be in range 0..<length.

Throws

if the index is out of range.


Returns the Unicode code point at the specified index of this char sequence.

The index refers to the char-based position in the char sequence, and the returned value is the code point represented by the character or surrogate pair (a high surrogate char followed by a low surrogate char) at that position.

If the index points to an unpaired surrogate character, for example, in the middle of a surrogate pair, the code point with the code of that only one character is returned.

Since Kotlin

2.5

Return

the Unicode code point as a CodePoint corresponding to the character or surrogate pair at the given index.

Parameters

index

the char-based position in the char sequence for which the Unicode code point is to be returned, must be in range 0..<length.

Throws

if the index is out of range.


Returns the Unicode code point at the specified index of this char array.

The index refers to the char-based position in the char array, and the returned value is the code point represented by the character or surrogate pair (a high surrogate char followed by a low surrogate char) at that index.

If the index points to an unpaired surrogate character, for example, in the middle of a surrogate pair, the code point with the code of that only one character is returned.

Since Kotlin

2.5

Return

the Unicode code point as a CodePoint corresponding to the character or surrogate pair at the given index.

Parameters

index

the char-based position in the char array for which the Unicode code point is to be returned, must be in range 0..<size.

Throws

if the index is out of range.


Returns the Unicode code point at the specified index of this char array.

The index refers to the char-based position in the char array, and the returned value is the code point represented by the character or surrogate pair (a high surrogate char followed by a low surrogate char) at that index.

If the index points to an unpaired surrogate character, for example, in the middle of a surrogate pair, the code point with the code of that only one character is returned.

The endIndex limits the end of a subrange in the char array, so that only characters at indices less than endIndex are considered.

Since Kotlin

2.5

Return

the Unicode code point as a CodePoint corresponding to the character or surrogate pair at the given index.

Parameters

index

the char-based position in the char array for which the Unicode code point is to be returned, must be in range 0..<endIndex.

endIndex

the char-based position in the char array that limits the end of a subrange in the char array, must be in range 0..size.

Throws

if the index or endIndex are out of range.

Returns the Unicode code point at the specified index of this string.

The index refers to the char-based position in the string, and the returned value is the code point represented by the character or surrogate pair (a high surrogate char followed by a low surrogate char) at that position.

If the index points to an unpaired surrogate character, for example, in the middle of a surrogate pair, the code point with the code of that only one character is returned.

Since Kotlin

2.5

Return

the Unicode code point as a CodePoint corresponding to the character or surrogate pair at the given index.

Parameters

index

the char-based position in the string for which the Unicode code point is to be returned, must be in range 0..<length.

Throws

if the index is out of range.


Returns the Unicode code point at the specified index of this char sequence.

The index refers to the char-based position in the char sequence, and the returned value is the code point represented by the character or surrogate pair (a high surrogate char followed by a low surrogate char) at that position.

If the index points to an unpaired surrogate character, for example, in the middle of a surrogate pair, the code point with the code of that only one character is returned.

Since Kotlin

2.5

Return

the Unicode code point as a CodePoint corresponding to the character or surrogate pair at the given index.

Parameters

index

the char-based position in the char sequence for which the Unicode code point is to be returned, must be in range 0..<length.

Throws

if the index is out of range.


Returns the Unicode code point at the specified index of this char array.

The index refers to the char-based position in the char array, and the returned value is the code point represented by the character or surrogate pair (a high surrogate char followed by a low surrogate char) at that index.

If the index points to an unpaired surrogate character, for example, in the middle of a surrogate pair, the code point with the code of that only one character is returned.

Since Kotlin

2.5

Return

the Unicode code point as a CodePoint corresponding to the character or surrogate pair at the given index.

Parameters

index

the char-based position in the char array for which the Unicode code point is to be returned, must be in range 0..<size.

Throws

if the index is out of range.


actual inline fun CharArray.codePointAt(index: Int, endIndex: Int): CodePoint(source)

Returns the Unicode code point at the specified index of this char array.

The index refers to the char-based position in the char array, and the returned value is the code point represented by the character or surrogate pair (a high surrogate char followed by a low surrogate char) at that index.

If the index points to an unpaired surrogate character, for example, in the middle of a surrogate pair, the code point with the code of that only one character is returned.

The endIndex limits the end of a subrange in the char array, so that only characters at indices less than endIndex are considered.

Since Kotlin

2.5

Return

the Unicode code point as a CodePoint corresponding to the character or surrogate pair at the given index.

Parameters

index

the char-based position in the char array for which the Unicode code point is to be returned, must be in range 0..<endIndex.

endIndex

the char-based position in the char array that limits the end of a subrange in the char array, must be in range 0..size.

Throws

if the index or endIndex are out of range.