first

Returns the first character.

Since Kotlin

1.0

Throws

if the char sequence is empty.


inline fun CharSequence.first(predicate: (Char) -> Boolean): Char(source)

Returns the first character matching the given predicate.

Since Kotlin

1.0

Throws

if no such character is found.