Escape/unEscape: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
Created page with "ESCAPE(''string'') UNESCAPE(''string'') '''Description''' ESCAPE returns a string with all special characters turned into a % character followed by the hex value of the cha..."
 
No edit summary
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
ESCAPE(''string'')
{{Deprecated|newvarlink=encodeURIComponent/decodeURIComponent|newvarname=encodeURIComponent/decodeURIComponent}}


UNESCAPE(''string'')
Escape(''string'')


'''Description'''
unEscape(''string'')


ESCAPE returns a string with all special characters turned into a % character followed by the hex value of the character
== Description ==


UNESCAPE converts a string with special characters turned into a normal string.
Escape returns a string with all special characters turned into a % character followed by the hex value of the character.


'''Example'''
unEscape converts a string with special characters turned into a normal string.


<pre>
== Example ==
PRINT ESCAPE("ABC!@#$%")
 
PRINT UNESCAPE("ABC%0d%0aDEF")
<tabber>
</pre>
JavaScript=
<syntaxhighlight lang="JavaScript">
NSB.Print(escape("ABC!@#$%"));
NSB.Print(unescape("ABC%0d%0aDEF"));
</syntaxhighlight>
|-|
BASIC=
<syntaxhighlight lang="vb.net">
Print Escape("ABC!@#$%")
Print UnEscape("ABC%0d%0aDEF")
</syntaxhighlight>
</tabber>


'''Output'''
== Output ==


<pre>
<pre>
Line 24: Line 35:
</pre>
</pre>


'''Related Items'''
== Related Items ==
 
[[encodeURI/decodeURI|encodeURI]], [[encodeURI/decodeURI|decodeURI]], [[encodeURIComponent/decodeURIComponent|encodeURIComponent]], [[encodeURIComponent/decodeURIComponent|decodeURIComponent]]
 
[[Category:Language Reference]]


[[unescape|UNESCAPE]]
[[Category:Variable Handling]]

Latest revision as of 14:28, 24 July 2019

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)

Description

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.

Example

NSB.Print(escape("ABC!@#$%"));
NSB.Print(unescape("ABC%0d%0aDEF"));

Print Escape("ABC!@#$%")
Print UnEscape("ABC%0d%0aDEF")

Output

ABC%21@%23%24%25
ABC
DEF

Related Items

encodeURI, decodeURI, encodeURIComponent, decodeURIComponent