varsFromStrProp: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=varsFromStrProp
|name=varsFromStrProp
|version=1.3b42
|description=
|description=
Creates variables from a [[Macros:string property list|string property list]] with the values assigned to variables with the names of the keys in the [[Macros:string property list|string property list]]. The function returns the number of variables that were created.
Creates variables from a [[Macros:string property list|string property list]] with the values assigned to variables with the names of the keys in the [[Macros:string property list|string property list]]. The function returns the number of variables that were created.
Line 6: Line 7:
|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: num = varsFromStrProp(props)]
varsFromStrProp(props)
</source>
</source>



Revision as of 11:10, 10 March 2009

varsFromStrProp() Function

Introduced in version 1.3b42
Creates variables from a string property list with the values assigned to variables with the names of the keys in the string property list. The function returns the number of variables that were created.

Usage

varsFromStrProp(props)

Examples

    [h: varsFromStrProp("a=blah; b=doh; c=meh")][r: a] [r: b] [r: c]

Returns

blah doh meh