encode: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function encode== {{ProposedChange}} Encodes a string that was can be decoded with the decode() function. The decode() and encode...)
 
No edit summary
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Function encode==
{{MacroFunction
{{ProposedChange}}
|name=encode
|version=1.3b48
|description=Encodes a string that was can be decoded with the [[decode|decode()]] function. The [[decode | decode()]] and encode() functions can be used to encode a property list so that it can be embedded within another property list.


Encodes a string that was can be decoded with the [[Macros:Function:decode|decode()]] function. The [[Macros:Function:decode | decode()]] and encode() functions can be used to encode a property list so that it can be embedded within another property list.
|usage=
<syntaxhighlight lang="mtmacro" line>
encode(str)
</syntaxhighlight>


 
|example=
===Usage===
<syntaxhighlight lang="mtmacro" line>
<source lang="mtmacro" line>
[h: str = encode(string)]
</source>
 
===Examples===
<source lang="mtmacro" line>
[h: innerPropList = encode("val1=blah ; val2=blahblah")]
[h: innerPropList = encode("val1=blah ; val2=blahblah")]
[h: props = setStrProp(props, key, innerPropList)]
[h: props = setStrProp(props, key, innerPropList)]
</source>
</syntaxhighlight>
|also=
{{func|decode}}
}}
[[Category:String Function]]

Latest revision as of 23:59, 27 April 2023

encode() Function

Introduced in version 1.3b48
Encodes a string that was can be decoded with the decode() function. The decode() and encode() functions can be used to encode a property list so that it can be embedded within another property list.

Usage

encode(str)

Example

[h: innerPropList = encode("val1=blah ; val2=blahblah")]
[h: props = setStrProp(props, key, innerPropList)]

See Also