Rebol 程式設計/trim
外觀
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'."
]