You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
Activity
cssmagic commentedon May 8, 2015
JavaScript 变量
_.str.CNY人民币符号
¥。_.str.RMB_.str.CNY的别名。_.str.FULL_WIDTH_CNY全角的人民币符号
¥。示例
_.str.FULL_WIDTH_RMB_.str.FULL_WIDTH_CNY的别名。JavaScript 接口
_.str.isFullUrl(string)判断是否为完整的 URL。以
http://、https://或//开头的字符串即视为完整。参数
string-- 字符串。需要判断的字符串。返回值
布尔值。判断结果。
示例
_.str.isAbsolutePath(string)判断是否为绝对路径。以
http://、https://、//或/开头的字符串即视为绝对路径。参数
string-- 字符串。需要判断的字符串。返回值
布尔值。判断结果。
示例
_.str.uniq(array)从字符串数组中去除重复的项。
注意事项
null和'null'会被视为重复。参数
array-- 字符串数组。返回值
数组。去重结果。
示例
_.str.toFloat(string)转换为浮点数。
可以视为
parseFloat()的别名。参数
string-- 字符串。返回值
数字。转换结果。
示例
_.str.toInt(string)转换为整数。
可以视为
parseInt(string, 10)的别名。直接取整,不做舍入。参数
string-- 字符串。返回值
数字。转换结果。
示例
_.str.toFixed(string, [i])转换为固定位数的小数。会做舍入。
与
Number.prototype.toFixed()的功能类似,但此接口接收字符串,输出数字。参数
string-- 字符串。i-- 可选。整数。保留的位数。默认值为0。返回值
数字。转换结果。
示例