
// Funzioni relative alle stringhe

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}

// Funzioni relative agli array

Array.prototype.inArray = function (value)
	// Returns true if the passed value is found in the
	// array. Returns false if it is not.
	{
		var i;
		for (i=0; i < this.length; i++) {
			// Matches identical (===), not just similar (==).
			if (this[i] === value) {
				return true;
			}
	}
	return false;
};


