deleteStrProp: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function deleteStrProp== Returns a copy of the [[Macros:string proper ===Usage=== <source lang="mtmacro" line> [h: val = ceil(num)] [h: val = ceiling(num)] </source> ===Examples=== <so...)
 
m (Text replacement - "<source" to "<syntaxhighlight")
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Function deleteStrProp==
{{MacroFunction
Returns a copy of the [[Macros:string proper
|name=deleteStrProp
|version=1.3b42
|description=Returns a copy of the [[Macros:string property list|string property list]] with the specified key removed.


===Usage===
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: val = ceil(num)]
deleteStrProp(props, key)
[h: val = ceiling(num)]
</syntaxhighlight>
</source>


===Examples===
|example=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: ceil(10)]
[r: deleteStrProp("a=blah; b=doh; c=meh", "a")]
</source>
</syntaxhighlight>
Returns 10.
Returns "b=doh; c=meh".
 
}}
<source lang="mtmacro" line>
[[Category:String Property List Function]]
[r: ceil(1.2)]
</source>
Returns 2.
 
<source lang="mtmacro" line>
[r: ceil(-1.2)]
</source>
Returns -1.

Latest revision as of 17:17, 14 March 2023

deleteStrProp() Function

Introduced in version 1.3b42
Returns a copy of the string property list with the specified key removed.

Usage

deleteStrProp(props, key)

Example

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