CharSequence

interface CharSequence(source)

Represents a readable sequence of Char values.

Since Kotlin

1.0
interface CharSequence(source)

Represents a readable sequence of Char values.

Since Kotlin

1.1

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
abstract operator fun get(index: Int): Char

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

Since Kotlin 1.1
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
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.1

Properties

Link copied to clipboard
abstract val length: Int

Returns the length of this character sequence.

Since Kotlin 1.0
abstract val length: Int

Returns the length of this character sequence.

Since Kotlin 1.1

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
Since Kotlin 1.0
Link copied to clipboard
inline fun <R : Comparable<R>> CharSequence.maxBy(selector: (Char) -> R): Char?
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?
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?
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?
fun CharSequence.minWith(comparator: Comparator<in Char>): Char?
Since Kotlin 1.0
Link copied to clipboard
fun CharSequence.split(regex: Pattern, limit: Int = 0): List<String>
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