Rebol 编程/trim
外观
< Rebol 编程
TRIM series /head /tail /auto /lines /all /with str
从字符串中删除空格。默认从头和尾删除。
TRIM 是一个动作值。
- series -- (类型:系列端口)
- /head -- 仅从头部删除。
- /tail -- 仅从尾部删除。
- /auto -- 自动缩进相对于第一行的行。
- /lines -- 删除所有换行符和多余的空格。
- /all -- 删除所有空格。
- /with
- str -- 与 /all 相同,但删除 'str' 中的字符。(类型:字符字符串)
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'."
]