summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMattias Wadman <mattias.wadman@gmail.com>2024-03-20 11:04:17 +0100
committerGitHub <noreply@github.com>2024-03-20 11:04:17 +0100
commitbe437ec049bb2300731522ca93f37cd2629b4cc8 (patch)
tree43b578a215508e105f632e923a47bff93c3eda6b /docs
parent81f4f883ac76de11ae9d99266554d31d3b7f0c0c (diff)
Add trim/0, ltrim/0 and rtrim/0 that trims leading and trailing whitespace (#3056)
Diffstat (limited to 'docs')
-rw-r--r--docs/content/manual/manual.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml
index ba2486c1..f2000f6f 100644
--- a/docs/content/manual/manual.yml
+++ b/docs/content/manual/manual.yml
@@ -1772,6 +1772,25 @@ sections:
input: '["fo", "foo", "barfoo", "foobar", "foob"]'
output: ['["fo","","bar","foobar","foob"]']
+ - title: "`trim`, `ltrim`, `rtrim`"
+ body: |
+
+ `trim` trims both leading and trailing whitespace.
+
+ `ltrim` trims only leading (left side) whitespace.
+
+ `rtrim` trims only trailing (right side) whitespace.
+
+ Whitespace characters are the usual `" "`, `"\n"` `"\t"`, `"\r"`
+ and also all characters in the Unicode character database with the
+ whitespace property. Note that what considers whitespace might
+ change in the future.
+
+ examples:
+ - program: 'trim, ltrim, rtrim'
+ input: '" abc "'
+ output: ['"abc"', '"abc "', '" abc"']
+
- title: "`explode`"
body: |