all

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

Returns true if all characters match the given predicate.

Note that if the char sequence contains no characters, the function returns true because there are no characters in it that do not match the predicate. See a more detailed explanation of this logic concept in "Vacuous truth" article.

Since Kotlin

1.0

Samples