forked from 0x2620/oxjs
use native ''.trim; rename vars
This commit is contained in:
parent
e480d87b34
commit
68ff06af2a
5 changed files with 138 additions and 157 deletions
|
|
@ -4,6 +4,6 @@ Ox.escapeRegExp <f> Escapes a string for use in a regular expression
|
|||
str <s> String
|
||||
@*/
|
||||
// see https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions
|
||||
Ox.escapeRegExp = function(str) {
|
||||
return (str + '').replace(/([\/\\^$*+?.-|(){}[\]])/g, '\\$1');
|
||||
Ox.escapeRegExp = function(string) {
|
||||
return (string + '').replace(/([\/\\^$*+?.-|(){}[\]])/g, '\\$1');
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue