// 提取特殊字符串长度(scrstr 源字符串 armstr 特殊字符) getStrCount: function(scrstr, armstr) { var count = 0; while (scrstr.indexOf(armstr) >= 1) { scrstr = scrstr.replace(armstr, "") count++; } return count; }
时间: 2024-11-01 22:01:41
// 提取特殊字符串长度(scrstr 源字符串 armstr 特殊字符) getStrCount: function(scrstr, armstr) { var count = 0; while (scrstr.indexOf(armstr) >= 1) { scrstr = scrstr.replace(armstr, "") count++; } return count; }