Files
number_zj/20220330_Vote/Ewide.Web.Entry/wwwroot/lib/xe-utils/trimLeft.js
毛财君 197b38ca6f 1
2023-07-06 17:37:33 +08:00

14 lines
306 B
JavaScript

var toValueString = require('./toValueString')
/**
* 去除字符串左边的空格
*
* @param {String} str 字符串
* @return {String}
*/
function trimLeft (str) {
return str && str.trimLeft ? str.trimLeft() : toValueString(str).replace(/^[\s\uFEFF\xA0]+/g, '')
}
module.exports = trimLeft