﻿var StringBuilder  = new Class({
    initialize: function(){
                this.StorageArry=new Array();
	            },
    Append: function(e){
                this.StorageArry.push(e)
    	        },
    Clear: function(){
                 this.StorageArry=new Array();
    	        },
    ToString: function(){
                return this.StorageArry.join("");
    	        }
});

String.prototype.$Replace = function(strTarget,strSubString)
{
    var strText = this;
    var intIndexOfMatch = strText.indexOf( strTarget );
    while (intIndexOfMatch != -1)
    {
        strText = strText.replace( strTarget, strSubString )
        intIndexOfMatch = strText.indexOf( strTarget );
    }
    return( strText );
}
function r$(st,pa)
{var re = new RegExp(pa);
var m = re.exec(st);
if (m || null) {return true}
else
return false}
