public static function cut( $string, $key, $cut_key = true, $last = false ) 
	{
		if ( $last )
		{
			$pos = strrpos( $string, $key );
		}
		else 
		{
			$pos = strpos( $string, $key );
		}

		if ( $pos === false ) 
		{
			return $string;
		}
		if ( !$cut_key ) 
		{
			$pos += strlen( $key );
		}
		return substr( $string, 0, $pos );
	}