dropLastWhile

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

Returns a subsequence of this char sequence containing all characters except last characters that satisfy the given predicate.

inline fun String.dropLastWhile(
    predicate: (Char) -> Boolean
): String
(source)

Returns a string containing all characters except last characters that satisfy the given predicate.