trim

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

Returns a sub sequence of this char sequence having leading and trailing characters matching the predicate removed.

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

Returns a string having leading and trailing characters matching the predicate removed.

fun CharSequence.trim(vararg chars: Char): CharSequence (source)

Returns a sub sequence of this char sequence having leading and trailing characters from the chars array removed.

fun String.trim(vararg chars: Char): String (source)

Returns a string having leading and trailing characters from the chars array removed.

Returns a sub sequence of this char sequence having leading and trailing whitespace removed.

inline fun String.trim(): String (source)

Returns a string having leading and trailing whitespace removed.