移除字符串的开始和/或末尾的某些字符.
Result := Trim(String, OmitChars := " `t") Result := LTrim(String, OmitChars := " `t") Result := RTrim(String, OmitChars := " `t")
任何字符串值或变量. 不支持数字.
可选的字符列表(区分大小写), 用来从 String 的开始和/或结尾部分移除这些字符. 如果省略, 则为空格和 tab.
text := "  text  "
MsgBox % "No trim:`t '" text "'"
    . "`nTrim:`t '" Trim(text) "'"
    . "`nLTrim:`t '" LTrim(text) "'"
    . "`nRTrim:`t '" RTrim(text) "'"