aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Syntax.md
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2021-03-07 22:59:21 -0600
committerXavier Claessens <xclaesse@gmail.com>2021-03-09 06:27:58 -0500
commitc83106ee38048acbe737ef112e8d51c9b5bd42d7 (patch)
tree7d2edd54b8d98e6c65f9f20291721070e5207e3e /docs/markdown/Syntax.md
parent487eef29076670385928ee10bc7f462ffa890af6 (diff)
downloadmeson-c83106ee38048acbe737ef112e8d51c9b5bd42d7.zip
meson-c83106ee38048acbe737ef112e8d51c9b5bd42d7.tar.gz
meson-c83106ee38048acbe737ef112e8d51c9b5bd42d7.tar.bz2
Add str.replace() method
Diffstat (limited to 'docs/markdown/Syntax.md')
-rw-r--r--docs/markdown/Syntax.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index 30682bd..5579855 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -186,6 +186,17 @@ As can be seen, the formatting works by replacing placeholders of type
Strings also support a number of other methods that return transformed
copies.
+#### .replace()
+
+Since 0.58.0, you can replace a substring from a string.
+
+```meson
+# Replaces all instances of one substring with another
+s = 'semicolons;as;separators'
+s = s.replace('as', 'are')
+# 's' now has the value of 'semicolons;are;separators'
+```
+
#### .strip()
```meson