411 REFERENCE · Wikibooks
Rebol Programming/trim
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
USAGE:
TRIM series /head /tail /auto /lines /all /with str
DESCRIPTION:
Removes whitespace from a string. Default removes from head and tail.
TRIM is an action value.
ARGUMENTS
series -- (Type: series port)
REFINEMENTS
/head -- Removes only from the head.
/tail -- Removes only from the tail.
/auto -- Auto indents lines relative to first line.
/lines -- Removes all line breaks and extra spaces.
/all -- Removes all whitespace.
/with
str -- Same as /all, but removes characters in 'str'. (Type: char string)
SOURCE CODE
trim: native[
{Removes whitespace from a string. Default removes from head and tail.}
series [series! port!]
/head "Removes only from the head."
/tail "Removes only from the tail."
/auto "Auto indents lines relative to first line."
/lines "Removes all line breaks and extra spaces."
/all "Removes all whitespace."
/with str [char! string!] "Same as /all, but removes characters in 'str'."
]