encode: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page Encode to encode: Converting page titles to lowercase)
m (Text replacement - "source>" to "syntaxhighlight>")
Line 7: Line 7:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
encode(str)
encode(str)
</source>
</syntaxhighlight>


|example=
|example=
Line 13: Line 13:
[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>
}}
}}
[[Category:String Function]]
[[Category:String Function]]

Revision as of 17:07, 14 March 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

<source lang="mtmacro" line> encode(str) </syntaxhighlight>

Example

<source lang="mtmacro" line>

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

</syntaxhighlight>