summaryrefslogtreecommitdiffstats
path: root/jq.1.prebuilt
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 /jq.1.prebuilt
parent81f4f883ac76de11ae9d99266554d31d3b7f0c0c (diff)
Add trim/0, ltrim/0 and rtrim/0 that trims leading and trailing whitespace (#3056)
Diffstat (limited to 'jq.1.prebuilt')
-rw-r--r--jq.1.prebuilt24
1 files changed, 24 insertions, 0 deletions
diff --git a/jq.1.prebuilt b/jq.1.prebuilt
index 32221515..efa5aa2f 100644
--- a/jq.1.prebuilt
+++ b/jq.1.prebuilt
@@ -1930,6 +1930,30 @@ jq \'[\.[]|rtrimstr("foo")]\'
.
.IP "" 0
.
+.SS "trim, ltrim, rtrim"
+\fBtrim\fR trims both leading and trailing whitespace\.
+.
+.P
+\fBltrim\fR trims only leading (left side) whitespace\.
+.
+.P
+\fBrtrim\fR trims only trailing (right side) whitespace\.
+.
+.P
+Whitespace characters are the usual \fB" "\fR, \fB"\en"\fR \fB"\et"\fR, \fB"\er"\fR and also all characters in the Unicode character database with the whitespace property\. Note that what considers whitespace might change in the future\.
+.
+.IP "" 4
+.
+.nf
+
+jq \'trim, ltrim, rtrim\'
+ " abc "
+=> "abc", "abc ", " abc"
+.
+.fi
+.
+.IP "" 0
+.
.SS "explode"
Converts an input string into an array of the string\'s codepoint numbers\.
.