encode: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
==Function encode==
{{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.


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


===Examples===
|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)]