encode: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) No edit summary |
|||
Line 1: | Line 1: | ||
== | {{MacroFunction | ||
|name=encode | |||
|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. | |||
|usage= | |||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
[h: str = encode(str)] | [h: str = encode(str)] | ||
</source> | </source> | ||
|example= | |||
<source lang="mtmacro" line> | <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> | </source> | ||
}} | |||
[[Category:String Function]] |
Revision as of 01:47, 7 March 2009
encode() Function
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
[h: str = encode(str)]
Example
[h: innerPropList = encode("val1=blah ; val2=blahblah")]
[h: props = setStrProp(props, key, innerPropList)]