News — 04 April 2012
Easy to Understand Educational Video

// function qtrans_editorInit1() {

qtrans_isArray = function(obj) {
if (obj.constructor.toString().indexOf('Array') == -1)
return false;
else
return true;
}

String.prototype.xsplit = functio

n(_regEx){
// Most browsers can do this properly, so let them — they’ll do it faster
if (‘a~b’.split(/(~)/).length === 3) { return this.split(_regEx); }

if (!_regEx.global)
{ _regEx = new RegExp(_regEx.source, ‘g’ + (_regEx.ignoreCase ? ‘i’ : ”)); }

// IE (and any other browser that can’t capture the delimiter)
// will, unfortunately, have to be slowed down
var start = 0, arr=[];
var result;
while((result = _regEx.exec(this)) != null){
arr.push(this.slice(start, result.index));
if(result.length > 1) arr.push(result[1]);
start = _regEx.lastIndex;
}
if(start < this.length) arr.push(this.slice(start));
if(start == this.length) arr.push(''); //delim at the end
return arr;
};

qtrans_split = function(text) {
var split_regex = /()/gi;
var lang_begin_regex = //gi;
var lang_end_regex = //gi;
var morenextpage_regex = /(|

Related Articles

Share

About Author

admin