script.unescapeControlCharacters
Replaces Unicode escape sequences in a string with the characters they represent. For example, \u000a becomes a newline. Use it to restore text escaped with script.escapeControlCharacters.
It converts every sequence in the form \uXXXX, not only those for control characters.
js
script.unescapeControlCharacters(input)Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | The string to unescape. |
Returns
stringThe string with its escape sequences converted to characters.
Examples
js
const original = script.unescapeControlCharacters("Line one\\u000aLine two");text
Line one
Line two