codePointCount
Counts the number of Unicode code points in the specified range of the string.
The range is defined by the startIndex (inclusive) and endIndex (exclusive) parameters. By default, the entire string is considered.
Any unpaired surrogate chars, for example, appearing when startIndex or endIndex fall into the middle of a surrogate pair, are counted as one code point each.
Since Kotlin
2.5Return
The number of Unicode code points in the specified range.
Parameters
The beginning index, inclusive. Defaults to 0.
The ending index, exclusive. Defaults to the length of the string.
Throws
If startIndex or endIndex is out of the valid range 0..length or endIndex < startIndex.
Counts the number of Unicode code points in the specified range of the char sequence.
The range is defined by the startIndex (inclusive) and endIndex (exclusive) parameters. By default, the entire char sequence is considered.
Any unpaired surrogate chars, for example, appearing when startIndex or endIndex fall into the middle of a surrogate pair, are counted as one code point each.
Since Kotlin
2.5Return
The number of Unicode code points in the specified range.
Parameters
The beginning index, inclusive. Defaults to 0.
The ending index, exclusive. Defaults to the length of the char sequence.
Throws
If startIndex or endIndex is out of the valid range 0..length or endIndex < startIndex.
Counts the number of Unicode code points in the specified range of the char array.
The range is defined by the startIndex (inclusive) and endIndex (exclusive) parameters. By default, the entire char array is considered.
Any unpaired surrogate chars, for example, appearing when startIndex or endIndex fall into the middle of a surrogate pair, are counted as one code point each.
Since Kotlin
2.5Return
The number of Unicode code points in the specified range.
Parameters
The beginning index, inclusive. Defaults to 0.
The ending index, 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.
Counts the number of Unicode code points in the specified range of the string.
The range is defined by the startIndex (inclusive) and endIndex (exclusive) parameters. By default, the entire string is considered.
Any unpaired surrogate chars, for example, appearing when startIndex or endIndex fall into the middle of a surrogate pair, are counted as one code point each.
Since Kotlin
2.5Return
The number of Unicode code points in the specified range.
Parameters
The beginning index, inclusive. Defaults to 0.
The ending index, exclusive. Defaults to the length of the string.
Throws
If startIndex or endIndex is out of the valid range 0..length or endIndex < startIndex.
Counts the number of Unicode code points in the specified range of the char sequence.
The range is defined by the startIndex (inclusive) and endIndex (exclusive) parameters. By default, the entire char sequence is considered.
Any unpaired surrogate chars, for example, appearing when startIndex or endIndex fall into the middle of a surrogate pair, are counted as one code point each.
Since Kotlin
2.5Return
The number of Unicode code points in the specified range.
Parameters
The beginning index, inclusive. Defaults to 0.
The ending index, exclusive. Defaults to the length of the char sequence.
Throws
If startIndex or endIndex is out of the valid range 0..length or endIndex < startIndex.
Counts the number of Unicode code points in the specified range of the char array.
The range is defined by the startIndex (inclusive) and endIndex (exclusive) parameters. By default, the entire char array is considered.
Any unpaired surrogate chars, for example, appearing when startIndex or endIndex fall into the middle of a surrogate pair, are counted as one code point each.
Since Kotlin
2.5Return
The number of Unicode code points in the specified range.
Parameters
The beginning index, inclusive. Defaults to 0.
The ending index, 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.