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.
|
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
|
|
|