/doc/efun/explode


SYNOPSIS

string *explode(string str, string del)

DESCRIPTION

Return an array of strings, created when the string str is splitted into substrings as divided by del.

EXAMPLE

	string *strs;
	strs = explode(" ab cd ef ", " ");
This will return an array with five strings ({"" "ab","cd","ef" ""}). Not that the behaviour has changed at some point. In former times it used to be an array with three strings ({"ab","cd","ef"}), i.e. the empty strings were ignored. The new behaviour is more consistent, because now implode(explode(stri, "c"), "c") == str is always true.

strs=explode("abc", "abc"); returns ({"",""})
explode("", "") returns ({}).
strs = explode("abc", "xyz"); returns ({ "abc" })
strs = explode("abc", ""); returns ({"a","b","c"})

SEE ALSO

sscanf
extract
implode
regexplode

| Home | Applied | Concepts | Efuns | Help | Intro | Lib | LPC | Prop | Obj | Sefuns | Std | W |

Nightfall@quest.tat.physik.uni-tuebingen.de
Automatically generated on Don, 11. Apr 1996