//=============================================================================
String.prototype.test = function(strRegExp, strOption) 
{
    var regEx = new RegExp(strRegExp, strOption ? strOption : "g");
    return regEx.test(this);
};
//=============================================================================
//For fixing the parse int bug.
String.prototype.ParseInt = function()
{
	return parseInt(this).toString() == "NaN" ? 0 : parseInt(this);
}
//=============================================================================
String.prototype.isDefined = function(x) 
{
    if(typeof(x) == "undefined") 
    {
         return false;
    }
    return true;
};
//=============================================================================
String.prototype.trim = function() 
{ 
    return this.replace(/^\s*|\s*$/g, '');
}
//=============================================================================
String.prototype.isEmpty = function()
{
    return (this == "");
}
//=============================================================================
/**
* Seperates the string into array according to the given token... 
*
* @param	 token - The seperator token....
*
* @return	 Array of the substring parts between the tokens...
*
* TODO: ...
*/        
//=============================================================================
String.prototype.sliceString = function(token) 
{ 
    return this.split(token);      
}; 
//=============================================================================