Home
About
Policies
FAQ
Forums
Registration
Password Recovery

Sublist (MPI)

From Tapestries MUCK

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
-
[[Category:MPI functions]]
+
[[Category:MPI functions]][[Category:MPI List Handling Functions]]
=sublist=
=sublist=
<mpi>{sublist:list,pos1}
<mpi>{sublist:list,pos1}

Revision as of 00:48, 31 March 2007

sublist

{sublist:list,pos1}
{sublist:list,pos1,pos2}
{sublist:list,pos1,pos2,sep}

Takes a list, and returns a subset of the list items within it.

The subset is all the list items between list item pos1, and list item pos2, inclusive.

If the pos2 argument is omitted, it assumes that pos2 is the same as pos1. If pos2 is less than pos1, then all the list items between pos2 and pos1 are returned, in reversed order. If pos1 or pos2 are negative, it counts that many list items back from the end of the list, so -1 is the last list item, and -5 would be the fifth from last list item.

The input list is assumed to be delimited by carriage returns (\r) unless the sep argument is given.

Personal tools
Namespaces
Variants
Actions
navagation
information
wiki
Toolbox