unescapeJava

open fun unescapeJava(input: String): String(source)

Unescapes any Java literals found in the String. For example, it will turn a sequence of '\' and 'n' into a newline character, unless the '\' is preceded by another '\'.

This can be replaced by String::translateEscapes in JDK 13

Return

a new unescaped String, null if null string input

Parameters

input

the String to unescape, may be null