trim text
About this rule
Trims any whitespace from start and/or end of text.
Syntax
trim text (where)
-
input:text -
where:"start", "end", or "both" [default: "both"] -
output:text
Examples
To trim white space from the start and end of the input text:
R> ^^ " Hello, World! "
R> trim text
# "Hello, World!"
To trim white space from the end of each paragraph:
split paragraphs, apply to list (trim text (end)), join text ({$return})
(Tip: a shorter, quicker way to trim paragraph endings is to use trim pattern ("\s+$"), but either way will work.)
Targets
text value