STRING : object
字符串工具
Kind: global namespace
- STRING :
object
- .isNumberText(str) ⇒
Boolean
- .splitString(str, separator) ⇒
Array
- .joinText(strs) ⇒
String
- .isMailAddressText(str) ⇒
Boolean
- .format(date, formatText) ⇒
String
- .isNumberText(str) ⇒
STRING.isNumberText(str) ⇒ Boolean
检查其参数是否为数字格式的字符串
Kind: static method of STRING
Returns: Boolean
- 是返回true,否则返回false
Param | Type | Description |
---|---|---|
str | String |
字符串型参数 |
STRING.splitString(str, separator) ⇒ Array
按照指定的分割符,切割文本,将分割好的结果用通过数组返回
Kind: static method of STRING
Returns: Array
- 结果用通过数组返回
Param | Type | Description |
---|---|---|
str | String |
需要拆分的字符串 |
separator | String |
分割字串 |
STRING.joinText(strs) ⇒ String
将指定的字符串数组按照指定的分隔符组合成字符串
Kind: static method of STRING
Returns: String
- 返回字符串
Param | Type | Description |
---|---|---|
strs | Array |
字符串数组 |
STRING.isMailAddressText(str) ⇒ Boolean
检查其参数是否为电子邮箱地址格式的字符串,是返回true,否则返回false
Kind: static method of STRING
Returns: Boolean
- 检查其参数是否为电子邮箱地址格式的字符串,是返回true,否则返回false
Param | Type | Description |
---|---|---|
str | String |
要检查的字符串型 |
STRING.format(date, formatText) ⇒ String
把其日期参数转化成指定格式的字符串
Kind: static method of STRING
Returns: String
- 把其日期参数转化成指定格式的字符串
Param | Type | Description |
---|---|---|
date | Date |
日期型参数 |
formatText | String |
指定字符串格式 |
文档更新时间: 2023-05-29 03:30 作者:admin