diff options
author | Stone Tickle <lattis@mochiro.moe> | 2021-09-29 15:27:23 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-09-30 00:27:48 +0300 |
commit | fbc2e9b0efdd751d6525f5ecfbcafd554ee58ba8 (patch) | |
tree | 829bec9214b26375bfb7296e28d30da7791711d6 | |
parent | 6512478d2f18242b59adb96b88390038fbe25b46 (diff) | |
download | meson-fbc2e9b0efdd751d6525f5ecfbcafd554ee58ba8.zip meson-fbc2e9b0efdd751d6525f5ecfbcafd554ee58ba8.tar.gz meson-fbc2e9b0efdd751d6525f5ecfbcafd554ee58ba8.tar.bz2 |
doc: document string.strip() optional argument [skip ci]
-rw-r--r-- | docs/markdown/Syntax.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/markdown/Syntax.md b/docs/markdown/Syntax.md index 33b06cb..897d55b 100644 --- a/docs/markdown/Syntax.md +++ b/docs/markdown/Syntax.md @@ -253,6 +253,11 @@ s = s.replace('as', 'are') 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. +string = 'xyxHelloxyx'.strip('xy') +# 'string' now has the value 'Hello' ``` #### .to_upper(), .to_lower() |