1
0
Fork 0
forked from 0x2620/oxjs

use native ''.trim; rename vars

This commit is contained in:
rolux 2012-05-25 14:32:17 +02:00
commit 68ff06af2a
5 changed files with 138 additions and 157 deletions

View file

@ -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');
};