if(typeof(cfw) == 'undefined') {var cfw = {}};

cfw.core = {};

/**
 * Trim space
 * @param {string} str
 * @return {string }the trimmed string
 */

cfw.core.trim = function(str) {
	return str.toString().replace(/\s+$|^\s+/g,"");
};

/*:::::::::::::Array:::::::::::::*/
/**
 * Determines the index of the first element in which a specified value occurs
 * @param {array} array
 * @param {string} string
 * @return {int} index of the element, -1 if not found  
 */
cfw.core.arrayFind =function(array, string) {
	var index = -1;
	for(var i=0; i<array.length; i++){
		if(array[i] == string){
			index = i;
			break;
		}
	}
	return index;
}
