From be437ec049bb2300731522ca93f37cd2629b4cc8 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Wed, 20 Mar 2024 11:04:17 +0100 Subject: Add trim/0, ltrim/0 and rtrim/0 that trims leading and trailing whitespace (#3056) --- docs/content/manual/manual.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'docs') 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: | -- cgit v1.2.3