varsFromStrProp: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page VarsFromStrProp to varsFromStrProp: Converting page titles to lowercase) |
No edit summary |
||
Line 7: | Line 7: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro"> | ||
varsFromStrProp(props) | varsFromStrProp(props) | ||
varsFromStrProp(props, decor) | varsFromStrProp(props, decor) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|props|A string property list.}} | {{param|props|A string property list.}} | ||
Line 16: | Line 16: | ||
|examples= | |examples= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: varsFromStrProp("a=blah; b=doh; c=meh")] | [h: varsFromStrProp("a=blah; b=doh; c=meh")] | ||
[r: a] [r: b] [r: c] | [r: a] [r: b] [r: c] | ||
</ | </syntaxhighlight> | ||
'''Returns''' | '''Returns''' | ||
< | <syntaxhighlight lang="mtmacro"> | ||
blah doh meh | blah doh meh | ||
</ | </syntaxhighlight> | ||
|also= | |also= | ||
{{func|strPropFromVars}} | {{func|strPropFromVars}} |
Revision as of 17:00, 13 March 2023
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
This article needs: Documentation on how the decor(suffixed/unsuffixed) parameter works.
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)
varsFromStrProp(props, decor)
Parameters
props
- A string property list.decor
- Either SUFFIXED, which appends an underscore to the variable name, or UNSUFFIXED (default) which leaves the name as is.
Examples
[h: varsFromStrProp("a=blah; b=doh; c=meh")]
[r: a] [r: b] [r: c]
Returns
blah doh meh
See Also
Version Changes
- 1.3b49 - Added
suffixed
orunsuffixed
parameter option.