aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2020-07-09 12:34:34 +0200
committerXavier Claessens <xclaesse@gmail.com>2020-07-20 20:04:01 -0400
commit8f106a2b9a7824075e55d3f044f2c0c5dd3ee700 (patch)
tree95d4b7f319fb62f1321b5a15af91bb0e48e55a9a /docs/markdown/Reference-manual.md
parent804a71e8f2b7c1011c91bd016df435fc952677a0 (diff)
downloadmeson-8f106a2b9a7824075e55d3f044f2c0c5dd3ee700.zip
meson-8f106a2b9a7824075e55d3f044f2c0c5dd3ee700.tar.gz
meson-8f106a2b9a7824075e55d3f044f2c0c5dd3ee700.tar.bz2
string: add substring method
This method aims to offer a simple way to 'substring' an existing string with start and end values.
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r--docs/markdown/Reference-manual.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 966d408..080fe3e 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -1977,6 +1977,9 @@ are immutable, all operations return their results as a new string.
- `startswith(string)`: returns true if string starts with the string
specified as the argument
+- `substring(start,end)` *(since 0.56.0)*: returns a substring specified from start to end.
+ Both `start` and `end` arguments are optional, so, for example, `'foobar'.substring()` will return `'foobar'`.
+
- `strip()`: removes whitespace at the beginning and end of the string.
*(since 0.43.0)* Optionally can take one positional string argument,
and all characters in that string will be stripped.