Nyall Dawson 3c91c624c8 [expressions][feature] Add ltrim/rtrim functions
Allows trimming spaces or other characters from just the
start or end of strings
2023-03-06 08:38:38 +10:00

26 lines
650 B
Plaintext

{
"name": "rtrim",
"type": "function",
"groups": ["String"],
"description": "Removes the longest string containing only the specified characters (a space by default) from the end of string.",
"arguments": [{
"arg": "string",
"description": "string to trim"
},
{
"arg": "characters",
"description": "characters to trim",
"optional": true,
"default": "' '"
}],
"examples": [{
"expression": "rtrim(' hello world ')",
"returns": "' hello world'"
},
{
"expression": "rtrim('testxxzx', 'xyz')",
"returns": "'test'"
}],
"tags": ["removes", "whitespace", "spaces", "tabs", "trailing"]
}