summaryrefslogtreecommitdiffstats
path: root/source/rainerscript/functions/rs-replace.rst
diff options
context:
space:
mode:
Diffstat (limited to 'source/rainerscript/functions/rs-replace.rst')
-rw-r--r--source/rainerscript/functions/rs-replace.rst26
1 files changed, 26 insertions, 0 deletions
diff --git a/source/rainerscript/functions/rs-replace.rst b/source/rainerscript/functions/rs-replace.rst
new file mode 100644
index 0000000..2d98e75
--- /dev/null
+++ b/source/rainerscript/functions/rs-replace.rst
@@ -0,0 +1,26 @@
+*********
+replace()
+*********
+
+Purpose
+=======
+
+replace(str, substr_to_replace, replace_with)
+
+Returns new string with all instances of substr_to_replace replaced
+by replace_with.
+
+
+Example
+=======
+
+.. code-block:: none
+
+ replace("foo bar baz", " b", ", B")
+
+produces
+
+.. code-block:: none
+
+ "foo, Bar, Baz"
+