Splice()

From TinyMUX
Revision as of 20:41, 25 November 2010 by Ihavenomouth (talk | contribs) (New page: Category:Functions {{Function|splice(<list1>, <list2>, <word>[, <idelim>[, <odelim>]])}} This function splices <list1> and <list2> together. <list1> and <list2> are space-separated l...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


splice(<list1>, <list2>, <word>[, <idelim>[, <odelim>]])

This function splices <list1> and <list2> together. <list1> and <list2> are space-separated lists of words

If a word in <list1> is the same as <word>, it is replaced by the word in the corresponding position in <list2>. Both lists must have the same number of words.

<idelim> may be used to specify an input delimiter other than a space.
<odelim> is the output delimiter.

Example

> say splice(foo bar baz,eek moof gleep,bar)

You say, "foo moof baz"

Related Topics

merge()