countStrProp: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
m (Added delim to usage and added parameters section.)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Function countStrProp==
{{MacroFunction
Returns the number of keys in a [[Macros:string property list|string property list]].
|name=countStrProp
|version=1.3b42
|description=Returns the number of keys in a [[Macros:string property list|string property list]].


===Usage===
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: num = countStrProp(propList)]
countStrProp(propList)
</source>
countStrProp(propList, delim)
</syntaxhighlight>
'''Parameters'''
{{param|proplist|String property list to extract data from.}}
{{param|delim|Delimiter between fields (default is ";").}}


===Examples===
|example=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: countStrProp("a=blah; b=doh; c=meh")]
[r: countStrProp("a=blah; b=doh; c=meh")]
</source>
</syntaxhighlight>
Returns 3.
Returns 3.
}}
[[Category:String Property List Function]]

Latest revision as of 23:59, 14 November 2024

countStrProp() Function

Introduced in version 1.3b42
Returns the number of keys in a string property list.

Usage

countStrProp(propList)
countStrProp(propList, delim)

Parameters

  • proplist - String property list to extract data from.
  • delim - Delimiter between fields (default is ";").

Example

[r: countStrProp("a=blah; b=doh; c=meh")]
Returns 3.