CharSequence

interface CharSequence(source)

Represents a readable sequence of Char values.

Since Kotlin

1.0

Functions

Link copied to clipboard
abstract operator fun get(index: Int): Char

Returns the character at the specified index in this character sequence.

Since Kotlin 1.0
Link copied to clipboard
abstract fun subSequence(startIndex: Int, endIndex: Int): CharSequence

Returns a new character sequence that is a subsequence of this character sequence, starting at the specified startIndex and ending right before the specified endIndex.

Since Kotlin 1.0

Properties

Link copied to clipboard
abstract val length: Int

Returns the length of this character sequence.

Since Kotlin 1.0

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
actual inline fun CharSequence.elementAt(index: Int): Char

Returns a character at the given index or throws an IndexOutOfBoundsException if the index is out of bounds of this char sequence.

Since Kotlin 1.0
Link copied to clipboard

Returns true if this string is empty or consists solely of whitespace characters.

Since Kotlin 1.0
Link copied to clipboard
Since Kotlin 1.0
Link copied to clipboard
inline fun <R : Comparable<R>> CharSequence.maxBy(selector: (Char) -> R): Char?
Since Kotlin 1.0
Link copied to clipboard
fun CharSequence.maxWith(comparator: Comparator<in Char>): Char?
Since Kotlin 1.0
Link copied to clipboard
Since Kotlin 1.0
Link copied to clipboard
inline fun <R : Comparable<R>> CharSequence.minBy(selector: (Char) -> R): Char?
Since Kotlin 1.0
Link copied to clipboard
fun CharSequence.minWith(comparator: Comparator<in Char>): Char?
Since Kotlin 1.0
Link copied to clipboard
actual fun CharSequence.regionMatches(thisOffset: Int, other: CharSequence, otherOffset: Int, length: Int, ignoreCase: Boolean = false): Boolean

Returns true if the specified range in this char sequence is equal to the specified range in another char sequence.

Since Kotlin 1.0
Link copied to clipboard
actual fun CharSequence.repeat(n: Int): String

Returns a string containing this char sequence repeated n times.

Since Kotlin 1.0
Link copied to clipboard
fun CharSequence.split(regex: Pattern, limit: Int = 0): List<String>

Splits this char sequence around matches of the given regular expression.

Since Kotlin 1.0
Link copied to clipboard

Returns a new SortedSet of all characters.

Since Kotlin 1.0