Text Manipulation
unEscape
$unEscape
Converts the escape sequences in a string into their real characters. For example, \n becomes a real line break.
Syntax
$unEscape[text]
$unEscape
The function $unEscape[] converts escape sequences (\n, \t, \\, etc.) into their real characters.
Syntax
$unEscape[text]
Parameters
| Parameter | Description |
|---|---|
text |
String containing escape sequences to resolve. |
Return Value
- Type: String
- The text with escape sequences resolved.
Supported Sequences
| Sequence | Result |
|---|---|
\n |
Line break |
\t |
Tab |
\\ |
Backslash |
\" |
Double quote |
\' |
Single quote |
Examples
Multi-line Text
$sendMessage[$unEscape[Line 1\nLine 2\nLine 3]]
Message Formatted from a Variable
$let[data;Name: John\nAge: 25\nCity: Paris]
$sendMessage[$unEscape[$var[data]]]
Code with Quotes
$sendMessage[$unEscape[He said: \"Hello!\" ]]
Embed with Formatted Description
$title[Information]
$description[$unEscape[**User:** $username\n**ID:** $authorID\n**Role:** $getRole[$authorID;1]]]
$sendMessage[]
Notes
- Do not confuse with
$disableSpecialEscapingwhich disables BDFD interpretation. - Useful for formatting text stored in variables or databases.
- To encode text for URLs, use
$urlEncode[].