aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Syntax.md
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-07-28 12:11:42 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-07-28 12:13:42 -0400
commit1b8dcbcc5782a7809d23d5bff1baeb5fee74068e (patch)
treea4a53cdb1eaa6057e1ed666b601390f2fe8dccf6 /docs/markdown/Syntax.md
parent9eb7fe332f6a6a8babd040b76ad2a6808faf0423 (diff)
downloadmeson-1b8dcbcc5782a7809d23d5bff1baeb5fee74068e.zip
meson-1b8dcbcc5782a7809d23d5bff1baeb5fee74068e.tar.gz
meson-1b8dcbcc5782a7809d23d5bff1baeb5fee74068e.tar.bz2
docs: clarify what str.split does
The wording was a bit confusing and misled at least one person into thinking it behaved like `str.replace('c', '')` operating on the entire line. Tweak the wording to be more precise and avoid this confusion.
Diffstat (limited to 'docs/markdown/Syntax.md')
-rw-r--r--docs/markdown/Syntax.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md
index f63125e..9958db5 100644
--- a/docs/markdown/Syntax.md
+++ b/docs/markdown/Syntax.md
@@ -252,13 +252,13 @@ s = s.replace('as', 'are')
#### .strip()
```meson
-# Similar to the Python str.strip(). Removes leading/ending spaces and newlines
+# Similar to the Python str.strip(). Removes leading/ending spaces and newlines.
define = ' -Dsomedefine '
stripped_define = define.strip()
# 'stripped_define' now has the value '-Dsomedefine'
# You may also pass a string to strip, which specifies the set of characters to
-# be removed.
+# be removed instead of the default whitespace.
string = 'xyxHelloxyx'.strip('xy')
# 'string' now has the value 'Hello'
```