N
AME
explode
- explode a string on a delimeter
S
YNTAX
#include <simulate.h>
string *explode(string
victim
, string
delimeter
);
D
ESCRIPTION
Explode divides the string called victim at every occurance of the string delimeter and returns the resulting parts in an array. If delimeter is an empty string, victim will be divided into strings of length 1.
Explode is the same as division.
E
XAMPLES
> explode("foobar","o");
Result: ({ "f", "", "bar" })
> explode("10101001010100010101","10");
Result: ({ "", "", "", "0", "", "", "00", "", "1" })
> explode("/foo/bar/gazonk","/");
Result: ({ "", "foo", "bar", "gazonk" })
> explode("foobar","");
Result: ({ "f", "o", "o", "b", "a", "r" })
K
EYWORDS
string
S
EE
A
LSO
implode
and
`/