kotlin.text.last

last

fun CharSequence.last(): Char

Returns the last character.

Exceptions

NoSuchElementException - if the char sequence is empty.

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

Returns the last character matching the given predicate.

Exceptions

NoSuchElementException - if no such character is fo