last

Returns the last character.

Since Kotlin

1.0

Throws

if the char sequence is empty.

Samples


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

Returns the last character matching the given predicate.

Since Kotlin

1.0

Throws

if no such character is found.

Samples