From 465041f1d4e8efb6f498e441fea55590d180af24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Sat, 24 Feb 1996 04:23:09 +0100
Subject: [PATCH] explode/implode now simulated

Rev: doc/simulated/explode:1.1
Rev: doc/simulated/implode:1.1
---
 doc/simulated/explode | 29 +++++++++++++++++++++++++++++
 doc/simulated/implode | 28 ++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 doc/simulated/explode
 create mode 100644 doc/simulated/implode

diff --git a/doc/simulated/explode b/doc/simulated/explode
new file mode 100644
index 0000000000..5c211fd74b
--- /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 0000000000..9c603bae54
--- /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
-- 
GitLab