Rest()

From TinyMUX
Revision as of 05:25, 24 November 2008 by Mikaey (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Rest()

FUNCTION: rest(<string>[, <delimeter>])


Description

Rest() takes a string and returns the contents of the string, removing the first element.


Examples

think rest(1 2 3 4 5)

2 3 4 5

-or-

think rest(1!2!3!4!5,!)

2!3!4!5

-or-

think rest(Testing the Rest() function!)

the Rest() function!

Using commas (,) as separators is tricky -- any instance of the comma must be escaped with a backslash (\), such as:

think rest(1\,2\,3\,4\,5, \,)

2,3,4,5