* 字符串转义 * @param {String} str * @return {String}
(str)
| 268 | * @return {String} |
| 269 | */ |
| 270 | escapeForRegexp(str) { |
| 271 | return str.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').replace(/\x08/g, '\\x08') |
| 272 | } |
| 273 | |
| 274 | /** |
| 275 | * 字符串转对象 |
nothing calls this directly
no outgoing calls
no test coverage detected