Package-level declarations

API and utility functions for working with Unicode code points, character properties, casing, and Unicode-aware text iteration.

API and utility functions for working with Unicode code points, character properties, casing, and Unicode-aware text iteration.

API and utility functions for working with Unicode code points, character properties, casing, and Unicode-aware text iteration.

API and utility functions for working with Unicode code points, character properties, casing, and Unicode-aware text iteration.

API and utility functions for working with Unicode code points, character properties, casing, and Unicode-aware text iteration.

API and utility functions for working with Unicode code points, character properties, casing, and Unicode-aware text iteration.

Types

Link copied to clipboard

Represents a Unicode code point, which is a numerical value that uniquely identifies a character in the Unicode standard.

Since Kotlin 2.5
Link copied to clipboard

An iterator for traversing Unicode code points bidirectionally within a text.

Since Kotlin 2.5
Link copied to clipboard

A specialized iterator of Unicode code points.

Since Kotlin 2.5
Link copied to clipboard

An iterable progression of values of type CodePoint.

Since Kotlin 2.5
Link copied to clipboard

An iterable range of values of type CodePoint.

Since Kotlin 2.5
Link copied to clipboard

A sequence of Unicode code points.

Since Kotlin 2.5

Properties

Link copied to clipboard

Returns the Unicode general category of the Unicode character corresponding to this code point.

Since Kotlin 2.5

Returns the Unicode general category of the Unicode character corresponding to this code point.

Since Kotlin 2.5
Link copied to clipboard

Functions

Link copied to clipboard

Appends the specified code point value to this Appendable and returns this instance.

Since Kotlin 2.5
Link copied to clipboard

Returns a CodePointSequence iterating through Unicode code points in this char sequence.

Since Kotlin 2.5

Returns a CodePointSequence iterating through Unicode code points in this string.

Since Kotlin 2.5

Returns a CodePointSequence iterating through Unicode code points in the specified range of this char array.

Since Kotlin 2.5
Link copied to clipboard

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

Since Kotlin 2.5

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

Since Kotlin 2.5

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

Since Kotlin 2.5
actual inline fun CharArray.codePointAt(index: Int, endIndex: Int): CodePoint

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

Since Kotlin 2.5

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

Since Kotlin 2.5

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

Since Kotlin 2.5
Link copied to clipboard

Returns the Unicode code point preceding the specified index in this char array.

Since Kotlin 2.5

Returns the Unicode code point preceding the specified index in this char sequence.

Since Kotlin 2.5

Returns the Unicode code point preceding the specified index in this string.

Since Kotlin 2.5
actual inline fun CharArray.codePointBefore(index: Int, startIndex: Int): CodePoint

Returns the Unicode code point preceding the specified index in this char array.

Since Kotlin 2.5

Returns the Unicode code point preceding the specified index in this char sequence.

Since Kotlin 2.5

Returns the Unicode code point preceding the specified index in this string.

Since Kotlin 2.5
Link copied to clipboard
expect fun CharArray.codePointCount(startIndex: Int = 0, endIndex: Int = this.size): Int

Counts the number of Unicode code points in the specified range of the char array.

Since Kotlin 2.5
expect fun CharSequence.codePointCount(startIndex: Int = 0, endIndex: Int = this.length): Int

Counts the number of Unicode code points in the specified range of the char sequence.

Since Kotlin 2.5
expect fun String.codePointCount(startIndex: Int = 0, endIndex: Int = this.length): Int

Counts the number of Unicode code points in the specified range of the string.

Since Kotlin 2.5
actual fun CharArray.codePointCount(startIndex: Int, endIndex: Int): Int

Counts the number of Unicode code points in the specified range of the char array.

Since Kotlin 2.5
actual inline fun CharSequence.codePointCount(startIndex: Int, endIndex: Int): Int

Counts the number of Unicode code points in the specified range of the char sequence.

Since Kotlin 2.5
actual inline fun String.codePointCount(startIndex: Int, endIndex: Int): Int

Counts the number of Unicode code points in the specified range of the string.

Since Kotlin 2.5
Link copied to clipboard

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

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

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

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.

Since Kotlin 2.5
fun CharArray.codePointIterator(index: Int, startIndex: Int = 0, endIndex: Int = size): CodePointIndexedIterator

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.

Since Kotlin 2.5
Link copied to clipboard

Returns true if the Unicode character corresponding to the specified codePoint belongs to this category.

Since Kotlin 2.5

Checks if the specified value belongs to this range.

Since Kotlin 2.5

Returns true if this range contains the specified element.

Since Kotlin 2.5
Link copied to clipboard

Removes the CodePoint at the specified index from this StringBuilder and returns this instance.

Since Kotlin 2.5
Link copied to clipboard

Returns a progression from this value down to and including the specified to value with the step -1.

Since Kotlin 2.5
Link copied to clipboard

Executes the given action on each Unicode code point of this char sequence.

Since Kotlin 2.5

Executes the given action on each Unicode code point of this string.

Since Kotlin 2.5
inline fun CharArray.forEachCodePoint(startIndex: Int = 0, endIndex: Int = size, action: (CodePoint) -> Unit)

Executes the given action on each Unicode code point in the specified range of this char array.

Since Kotlin 2.5
Link copied to clipboard

Inserts the specified code point value into this StringBuilder at the specified index and returns this instance.

Since Kotlin 2.5
Link copied to clipboard

Returns true if the Unicode character corresponding to this code point is defined in Unicode.

Since Kotlin 2.5

Returns true if this character (Unicode code point) is defined in Unicode.

Since Kotlin 2.5
Link copied to clipboard

Returns true if the Unicode character corresponding to this code point is a digit.

Since Kotlin 2.5

Returns true if the Unicode character corresponding to this code point is a digit.

Since Kotlin 2.5
Link copied to clipboard

Returns true if the Unicode character corresponding to this code point is an ISO control character.

Since Kotlin 2.5

Returns true if the Unicode character corresponding to this code point is an ISO control character.

Since Kotlin 2.5
Link copied to clipboard

Returns true if the Unicode character corresponding to this code point is a letter.

Since Kotlin 2.5

Returns true if the Unicode character corresponding to this code point is a letter.

Since Kotlin 2.5
Link copied to clipboard

Returns true if the Unicode character corresponding to this code point is a letter or digit.

Since Kotlin 2.5

Returns true if the Unicode character corresponding to this code point is a letter or digit.

Since Kotlin 2.5
Link copied to clipboard

Returns true if the Unicode character corresponding to this code point is lower case.

Since Kotlin 2.5

Returns true if the Unicode character corresponding to this code point is lower case.

Since Kotlin 2.5
Link copied to clipboard

Returns true if the Unicode character corresponding to this code point is a title case letter.

Since Kotlin 2.5

Returns true if the Unicode character corresponding to this code point is a title case letter.

Since Kotlin 2.5
Link copied to clipboard

Returns true if the Unicode character corresponding to this code point is upper case.

Since Kotlin 2.5

Returns true if the Unicode character corresponding to this code point is upper case.

Since Kotlin 2.5
Link copied to clipboard

Determines whether the Unicode character corresponding to this code point is whitespace.

Since Kotlin 2.5

Determines whether the Unicode character corresponding to this code point is whitespace.

Since Kotlin 2.5
Link copied to clipboard

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5
Link copied to clipboard

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to lower case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5
Link copied to clipboard
expect fun CharSequence.offsetByCodePoints(index: Int, codePointOffset: Int): Int

Calculates the index of the character that is a specified number of Unicode code points away from the character at the given index in this char sequence.

Since Kotlin 2.5
expect fun String.offsetByCodePoints(index: Int, codePointOffset: Int): Int

Calculates the index of the character that is a specified number of Unicode code points away from the character at the given index in this string.

Since Kotlin 2.5
expect fun CharArray.offsetByCodePoints(index: Int, codePointOffset: Int, startIndex: Int = 0, endIndex: Int = this.size): Int

Calculates the index of the character that is a specified number of Unicode code points away from the character at the given index in the specified range of this array.

Since Kotlin 2.5
actual inline fun CharSequence.offsetByCodePoints(index: Int, codePointOffset: Int): Int

Calculates the index of the character that is a specified number of Unicode code points away from the character at the given index in this char sequence.

Since Kotlin 2.5
actual inline fun String.offsetByCodePoints(index: Int, codePointOffset: Int): Int

Calculates the index of the character that is a specified number of Unicode code points away from the character at the given index in this string.

Since Kotlin 2.5
actual inline fun CharArray.offsetByCodePoints(index: Int, codePointOffset: Int, startIndex: Int, endIndex: Int): Int

Calculates the index of the character that is a specified number of Unicode code points away from the character at the given index in the specified range of this array.

Since Kotlin 2.5
Link copied to clipboard

Returns a random element from this range.

Since Kotlin 2.5

Returns a random element from this range using the specified source of randomness.

Since Kotlin 2.5
Link copied to clipboard

Returns a random element from this range, or null if this range is empty.

Since Kotlin 2.5

Returns a random element from this range using the specified source of randomness, or null if this range is empty.

Since Kotlin 2.5
Link copied to clipboard

Replaces the code point at the specified index in this StringBuilder with the specified value and returns this instance.

Since Kotlin 2.5
Link copied to clipboard

Returns a progression that goes over the same range with the given step.

Since Kotlin 2.5
Link copied to clipboard

Converts this code point to title case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5
Link copied to clipboard

Converts this code point to title case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to title case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5
Link copied to clipboard

Converts this Char to a CodePoint.

Since Kotlin 2.5

Converts this Int value to a CodePoint.

Since Kotlin 2.5
Link copied to clipboard

Returns a range from this value up to but excluding the specified other value.

Since Kotlin 2.5
Link copied to clipboard

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5
Link copied to clipboard

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

Since Kotlin 2.5