标签:pre turn ace 分隔符 san UNC bit replace sep
function thousandBitSeparator(num){ var re=/\d{1,3}(?=(\d{3})+$)/g; var n1=num.toString().replace(/^(\d+)((\.\d+)?)$/,function(s,s1,s2){return s1.replace(re,"$&,")+s2;}); return n1; }
标签:pre turn ace 分隔符 san UNC bit replace sep
原文地址:https://www.cnblogs.com/xiufengd/p/9026110.html