kotlin.text.dropLastWhile

dropLastWhile

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

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

Returns a string containing all characters except last characters