diff --git a/doc/simulated/explode b/doc/simulated/explode new file mode 100644 index 0000000000000000000000000000000000000000..5c211fd74b80b30084debabd3ef2277f4bf5cde6 --- /dev/null +++ b/doc/simulated/explode @@ -0,0 +1,29 @@ +NAME + explode - explode a string on a delimeter + +SYNTAX + string *explode(string victim, string delimeter); + or + victim / delimiter + +DESCRIPTION + 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. + +EXAMPLES + > 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" }) + +KEYWORDS + string + +SEE ALSO + implode diff --git a/doc/simulated/implode b/doc/simulated/implode new file mode 100644 index 0000000000000000000000000000000000000000..9c603bae541e05449b8df5e037391166acb160ae --- /dev/null +++ b/doc/simulated/implode @@ -0,0 +1,28 @@ +NAME + implode - implode an array of strings + +SYNTAX + string implode(string *a, string delimeter); + or + a * delimeter + +DESCRIPTION + This function is the inverse of explode. It contatenates all the + strings in a with a delimeter in between each. If no delimeter is + given, an empty string will be used. + +EXAMPLES + > implode( ({ "foo","bar","gazonk"}), "-" ); + Result: foo-bar-gazonk + > implode( ({ "f","o","o" }) ); + Result: foo + > ({ "a","b","c" })*" and "; + Result: a and b and c + > + +KEYWORDS + string + +SEE ALSO + explode + \ No newline at end of file