使用此插件

cleanStr 函数使用以下参数:

  • str(必需,字符串):用于清理 HTML 编码、额外空格、制表符或其他不必要字符的值。

该函数会返回 str 参数的值,并删除所有不必要的字符。

示例

// Returns the value "this is a messystring". Note that both tabs and extra spaces are present in the original string.
// Multiple spaces are reduced to one, while tabs are omitted entirely.
s.eVar1 = "  this  is a      messy  string    ";
s.eVar1 = cleanStr(s.eVar1)

// This function call does not do anything because the code does not assign the returned value to a variable.
s.eVar1 = "  this  is a      messy  string    ";
cleanStr(s.eVar1);

版本历史记录

2.0(2021 年 3 月 19 日)

  • 以上下文数据形式添加了版本号。

1.0(2018 年 4 月 15 日)

  • 第一版。
下一页formatTime

Analytics