// lib_string
// Stefan Huster - stefan.huster@online.de
// (c) 2009


function lib_string () {

	this.ltrim = function (str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
	}
	 
	this.rtrim = function (str, chars) {
		chars = chars || "\\s";
		return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
	}
	
	this.trim = function (str, chars) {
		return this.ltrim(this.rtrim(str, chars), chars);
	}
	 
	

}
