Core Function Unescape
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> Unescape( <expression> ) </pre> === Description === Remove all escapes from a string. === Parameters === ==== expression ==== The string to use. === Return Value === ...") |
(→Remarks) |
||
Line 21: | Line 21: | ||
=== Remarks === | === Remarks === | ||
− | + | This removes all escapes from a string regardless if the escape is valid or not so even \# will be replaced with #. | |
+ | |||
+ | If you require more specific escape/unescape functions see the ones that deal with C/Sputnik specific escapes. | ||
=== Example === | === Example === |
Revision as of 15:31, 13 September 2013
Unescape( <expression> )
Contents |
Description
Remove all escapes from a string.
Parameters
expression
The string to use.
Return Value
Success: Returns a string with backslashes stripped off. (\' becomes ' and so on.) Double backslashes (\\) are made into a single backslash (\).
Failure: Returns empty string.
Remarks
This removes all escapes from a string regardless if the escape is valid or not so even \# will be replaced with #.
If you require more specific escape/unescape functions see the ones that deal with C/Sputnik specific escapes.
Example
say Unescape(@"\m\n\t\\");// Prints: mnt\