Escape/unEscape: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
(Add javascript snippet)
Line 9: Line 9:
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 (Basic) ==


<pre>
<pre>
Print Escape("ABC!@#$%")
Print Escape("ABC!@#$%")
Print UnEscape("ABC%0d%0aDEF")
Print UnEscape("ABC%0d%0aDEF")
</pre>
== Example (JavaScript) ==
<pre>
NSB.Print(escape("ABC!@#$%"));
NSB.Print(unescape("ABC%0d%0aDEF"));
</pre>
</pre>



Revision as of 16:41, 19 May 2013

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 (Basic)

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

Example (JavaScript)

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

Output

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