unescapeValue

Unescapes string. You should unescape values returned by library before displaying until you want keep them as is (e.g., to allow user to edit values in escaped form).

@safe nothrow pure
inout(char)[]
unescapeValue
(
inout(char)[] value
)

Return Value

Type: inout(char)[]

Unescaped string.

Examples

assert(`a\\next\nline\top`.unescapeValue() == "a\\next\nline\top"); // notice how the string on the left is raw.
assert(`\\next\nline\top`.unescapeValue() == "\\next\nline\top");
string value = `nounescape`;
assert(value.unescapeValue() is value); //original is returned.
assert(`a\\next\nline\top`.dup.unescapeValue() == "a\\next\nline\top".dup);

See Also

Meta