Lmember (MPI)
From Tapestries MUCK
(Difference between revisions)
Line 1: | Line 1: | ||
- | [[Category: | + | [[Category:functions (MPI)]][[Category:List Handling Functions (MPI)]] |
=lmember= | =lmember= | ||
<mpi>{lmember:list,item} | <mpi>{lmember:list,item} |
Latest revision as of 01:39, 31 March 2007
lmember
{lmember:list,item} {lmember:list,item,delimiter}
Returns 0 if the given item is NOT in the given list, otherwise, it returns the item's position in the list.
The first list item in the list would return 1, and the third would return 3, for example.
If the delimiter argument is given, then it treats the list as if it were delimited by that string, instead of by carriage returns. (\r's)
Example:
{lmember:{mklist:a,b,c,d,e,f},d}
would return 4.