< Rebol Programming
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'."
]
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.