escape

open fun escape(string: String): String

Replace special characters with XML escapes:


& (ampersand) is replaced by &
< (less than) is replaced by <
> (greater than) is replaced by >
" (double quote) is replaced by "
' (single quote / apostrophe) is replaced by '

Return

The escaped string.

Parameters

string

The string to be escaped.