listDelete: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Macros:Functions:listDelete moved to listDelete: Moved out of the Macros namespace)
m (Added MacroFunction template and String List Function category)
Line 1: Line 1:
==Function listDelete==
{{MacroFunction
 
|name=listDelete
|description=
Returns a [[Macros:string list|string list]] with the specified item deleted from it. The index for the [[Macros:string list|string list]]  
Returns a [[Macros:string list|string list]] with the specified item deleted from it. The index for the [[Macros:string list|string list]]  


===Usage===
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: list = listDelete(list, index)]
[h: list = listDelete(list, index)]
Line 11: Line 12:
If delim is not specified then the default value of ',' is used as the value separator in the [[Macros:string list|string list]]
If delim is not specified then the default value of ',' is used as the value separator in the [[Macros:string list|string list]]


===Example===
|example=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r: listDelete("This, is, a, test", 1)]  
[r: listDelete("This, is, a, test", 1)]  
</source>
</source>
Returns This, a, test
Returns This, a, test
}}
[[Category:String List Function]]

Revision as of 02:48, 9 March 2009

listDelete() Function

Returns a string list with the specified item deleted from it. The index for the string list

Usage

[h: list = listDelete(list, index)]
[h: list = listDelete(list, index, delim)]

If delim is not specified then the default value of ',' is used as the value separator in the string list

Example

[r: listDelete("This, is, a, test", 1)]
Returns This, a, test