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...)
 
No edit summary
Line 1: Line 1:
==Function deleteStrProp==
==Function deleteStrProp==
Returns a copy of the [[Macros:string proper
Returns a copy of the [[Macros:string property list|string property list]] with the specified key removed.


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


===Examples===
===Examples===
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r: ceil(10)]
[r: deleteStrProp("a=blah; b=doh; c=meh", "a")]
</source>
</source>
Returns 10.
Returns "b=doh; c=meh".
 
<source lang="mtmacro" line>
[r: ceil(1.2)]
</source>
Returns 2.
 
<source lang="mtmacro" line>
[r: ceil(-1.2)]
</source>
Returns -1.

Revision as of 13:24, 1 December 2008

Function deleteStrProp

Returns a copy of the string property list with the specified key removed.

Usage

[h: props = deleteStrProp(props, key)]

Examples

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

Returns "b=doh; c=meh".