public static function strInArray(array $arr, $str, $caseSensitive = true){

		if(!\is_string($str)){
			throw new \InvalidArgumentException('$str not a string');
		}

		if($caseSensitive){
			return \in_array($str, $arr, true);
		}

		$str = \strtolower($str);

		foreach($arr as $v){
			if($str === \strtolower($v)){
				return true;
			}
		}

		return false;

	}