master
Raw Download raw file
1String.extend({split:function(b,c){var d=[],g=0,e;e=function(f,i){var h=f.toString().match(/[^/]*$/)[0];if(i)h=(h+i).split("").sort().join("").replace(/([gimy])\1+/g,"$1");return h}(b,"g");b=RegExp(b.source,e);var j,a,k;RegExp.a||(j=RegExp("^"+b.source+"$(?!\\s)",e));if(c===undefined||c<0)c=Infinity;else{c=Math.floor(c);if(!c)return[]}for(;a=b.exec(this);){e=a.index+a[0].length;if(e>g){d.push(this.slice(g,a.index));!RegExp.a&&a.length>1&&a[0].replace(j,function(){for(var f=1;f<arguments.length-2;f++)if(arguments[f]===
2undefined)a[f]=undefined});a.length>1&&a.index<this.length&&array.prototype.push.apply(d,a.slice(1));k=a[0].length;g=e;if(d.length>=c)break}b.lastIndex===a.index&&b.lastIndex++}if(g===this.length){if(k||!b.test(""))d.push("")}else d.push(this.slice(g));return d.length>c?d.slice(0,c):d}},function(b){return Object.prototype.toString.call(b)==="[object RegExp]"});