remove

fun String.remove(vararg strings: String): String(source)

Removes all occurrences of specified strings from the receiver string.

Return

A new string with all occurrences of specified strings removed.

Parameters

strings

Strings to be removed from the receiver string.


fun String.remove(vararg patterns: Regex): String(source)

Removes all matches of specified regular expressions from the receiver string.

Return

A new string with all matches of specified regular expressions removed.

Parameters

patterns

Regular expressions to be removed from the receiver string.