NSB.Print(escape("ABC!@#$%"));
NSB.Print(unescape("ABC%0d%0aDEF"));
No edit summary |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Deprecated|newvarlink=encodeURIComponent/decodeURIComponent|newvarname=encodeURIComponent/decodeURIComponent}} | |||
Escape(''string'') | Escape(''string'') | ||
Line 9: | Line 11: | ||
unEscape converts a string with special characters turned into a normal string. | unEscape converts a string with special characters turned into a normal string. | ||
== Example | == Example == | ||
< | <tabber> | ||
JavaScript= | |||
<syntaxhighlight lang="JavaScript"> | |||
NSB.Print(escape("ABC!@#$%")); | |||
NSB.Print(unescape("ABC%0d%0aDEF")); | |||
</syntaxhighlight> | |||
|-| | |||
BASIC= | |||
<syntaxhighlight lang="vb.net"> | |||
Print Escape("ABC!@#$%") | Print Escape("ABC!@#$%") | ||
Print UnEscape("ABC%0d%0aDEF") | Print UnEscape("ABC%0d%0aDEF") | ||
</ | </syntaxhighlight> | ||
</tabber> | |||
</ | |||
== Output == | == Output == | ||
Line 32: | Line 37: | ||
== Related Items == | == Related Items == | ||
[[encodeURI|encodeURI]], [[encodeURIComponent|encodeURIComponent]] | [[encodeURI/decodeURI|encodeURI]], [[encodeURI/decodeURI|decodeURI]], [[encodeURIComponent/decodeURIComponent|encodeURIComponent]], [[encodeURIComponent/decodeURIComponent|decodeURIComponent]] | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
[[Category:Variable Handling]] | [[Category:Variable Handling]] |
This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility.
Please see encodeURIComponent/decodeURIComponent for an alternative way to use this feature. |
Escape(string)
unEscape(string)
Escape returns a string with all special characters turned into a % character followed by the hex value of the character.
unEscape converts a string with special characters turned into a normal string.
NSB.Print(escape("ABC!@#$%"));
NSB.Print(unescape("ABC%0d%0aDEF"));
Print Escape("ABC!@#$%")
Print UnEscape("ABC%0d%0aDEF")
ABC%21@%23%24%25 ABC DEF
encodeURI, decodeURI, encodeURIComponent, decodeURIComponent