nantai-erp-wechat-mobile/filter/formatString.wxs
2024-10-31 21:29:57 +08:00

19 lines
359 B
XML

var formatString = {
strSub: function (str, n) {
var result = str
if (str.length > n) {
result = str.substring(0, n) + '...'
}
return result
},
strCut: function (str, start, end) {
var result = str.substring(start, end)
return result
}
}
module.exports = {
strSub: formatString.strSub,
strCut: formatString.strCut
}