You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
310 B
14 lines
310 B
5 months ago
|
var toValueString = require('./toValueString')
|
||
|
|
||
|
/**
|
||
|
* 去除字符串右边的空格
|
||
|
*
|
||
|
* @param {String} str 字符串
|
||
|
* @return {String}
|
||
|
*/
|
||
|
function trimRight (str) {
|
||
|
return str && str.trimRight ? str.trimRight() : toValueString(str).replace(/[\s\uFEFF\xA0]+$/g, '')
|
||
|
}
|
||
|
|
||
|
module.exports = trimRight
|