kotlin.text.filterTo

filterTo

inline fun <C : Appendable> CharSequence.filterTo(
    destination: C, 
    predicate: (Char) -> Boolean
): C

Appends all characters matching the given predicate to the given destination.