字符串的起始、末尾或两端删除所有ASCII空白(空格、制表符、回车符和换行符)。去除空白的VI不删除双字节字符。

默认为删除字符串两端的空格。


icon

输入/输出

  • cu16.png location (both)

    location determines if this function removes white space from the beginning, end, or both ends of string.

    默认值为两端

    0两端—删除输入字符串两端的空白。
    1字符串首端—删除字符串首端的空白。
    2字符串末端—删除输入字符串末端的空白。
  • cstr.png string

    string is the input string.

  • istr.png trimmed string

    删除空白后的字符串为删除了空白后的字符串。