Свойство | Тип | Описание | |
---|---|---|---|
$hab_enc | String holding the current encoding the class is using |
Метод | Описание | |
---|---|---|
convert_encoding ( $str, $use_enc = null, $from_enc = null ) : mixed | Converts a string's encoding to a new encoding | |
detect_bom_encoding ( $source_contents ) : mixed | Detects the encoding being used for a string using the existence of a byte order mark | |
detect_encoding ( $str ) : mixed | Detects the encoding being used for a string | |
hab_encoding ( $use_enc = null ) : string. | Sets and returns the internal encoding. | |
lcfirst ( string $str, string $use_enc = null ) : string | Makes a string's first character lowercase | |
library ( integer $new_library = null ) : mixed | Sets and returns the multibyte library being used internally | |
str_ireplace ( mixed $search, mixed $replace, string $subject, integer &$count, string $use_enc = null ) : string | Replace all occurrences of the search string with the replacement string. | |
str_replace ( mixed $search, mixed $replace, string $subject, integer &$count, string $use_enc = null ) : string | Replace all occurrences of the search string with the replacement string. | |
stripos ( $haysack, $needle, $offset, $use_enc = null ) : mixed | Find position of first occurrence of string in a string. Case insensitive. | |
strlen ( $str, $use_enc = null ) : integer. | Gets the length of a string in characters | |
strpos ( $haysack, $needle, $offset, $use_enc = null ) : mixed | Find position of first occurrence of string in a string | |
strripos ( $haysack, $needle, $offset, $use_enc = null ) : mixed | Find position of last occurrence of string in a string. Case insensitive. | |
strrpos ( $haysack, $needle, $offset, $use_enc = null ) : mixed | function strrpos | |
strtolower ( $str, $use_enc = null ) : string. | function strtolower | |
strtoupper ( $str, $use_enc = null ) : string. | Converts a multibyte string to uppercase. If a valid multibyte library isn't loaded, strtoupper() will be used, which can lead to unexpected results. | |
substr ( $str, $begin, $len = null, $use_enc = null ) : mixed | Get a section of a string | |
ucfirst ( string $str, string $use_enc = null ) : string | Makes a string's first character uppercase | |
ucwords ( string $str, string $use_enc = null ) : string | Uppercase the first character of each word in a string. | |
valid_data ( string $str, null $use_enc = null ) : boolean | Determines if the passed string is valid character data (according to mbstring) |
Метод | Описание | |
---|---|---|
__construct ( ) | An empty constructor since all functions are static |
public static convert_encoding ( $str, $use_enc = null, $from_enc = null ) : mixed | ||
$str | string. The string who's encoding is being changed. | |
$use_enc | string. The encoding to convert to. If not set, the internal encoding will be used. | |
$from_enc | string. encoding before conversion. If not set, encoding is detected automatically. | |
Результат | mixed | The source string in the new encoding or boolean false. |
public static detect_bom_encoding ( $source_contents ) : mixed | ||
$source_contents | string. The string whose encoding is being detected | |
Результат | mixed | The source string's detected encoding, or boolean false. |
public static detect_encoding ( $str ) : mixed | ||
$str | string. The string whose encoding is being detected | |
Результат | mixed | The source string's detected encoding, or boolean false. |
public static hab_encoding ( $use_enc = null ) : string. | ||
$use_enc | string. The encoding to be used | |
Результат | string. |
public static library ( integer $new_library = null ) : mixed | ||
$new_library | integer | The new library to use. One of the self::USE_* constants, null to simply return, or false to disable and use native non-multibyte-safe PHP methods. |
Результат | mixed | If $new_library is null, returns the current library being used. If $new_library has a valid value, returns the old library, else returns false. |
public static str_ireplace ( mixed $search, mixed $replace, string $subject, integer &$count, string $use_enc = null ) : string | ||
$search | mixed | A string or an array of strings to search for. |
$replace | mixed | A string or an array of strings to replace search values with. |
$subject | string | The string to perform the search and replace on. |
$count | integer | If passed, this value will hold the number of matched and replaced needles. |
$use_enc | string | The encoding to be used. If null, the internal encoding will be used. |
Результат | string | The subject with replaced values. |
public static str_replace ( mixed $search, mixed $replace, string $subject, integer &$count, string $use_enc = null ) : string | ||
$search | mixed | A string or an array of strings to search for. |
$replace | mixed | A string or an array of strings to replace search values with. |
$subject | string | The string to perform the search and replace on. |
$count | integer | If passed, this value will hold the number of matched and replaced needles. |
$use_enc | string | The encoding to be used. If null, the internal encoding will be used. |
Результат | string | The subject with replaced values. |
public static stripos ( $haysack, $needle, $offset, $use_enc = null ) : mixed | ||
$haysack | string. The string being checked. | |
$offset | integer. The search offset. If it is not specified, 0 is used. | |
$use_enc | string. The encoding to be used. If not set, the internal encoding will be used. | |
Результат | mixed | The section of the source string requested in the encoding requested or false. If $len is not set, returns substring from $begin to end of string. |
public static strlen ( $str, $use_enc = null ) : integer. | ||
$str | string. The string who's length is being returned. | |
$use_enc | string. The encoding to be used. If not set, the internal encoding will be used. | |
Результат | integer. |
public static strpos ( $haysack, $needle, $offset, $use_enc = null ) : mixed | ||
$haysack | string. The string being checked. | |
$offset | integer. The search offset. If it is not specified, 0 is used. | |
$use_enc | string. The encoding to be used. If not set, the internal encoding will be used. | |
Результат | mixed | The section of the source string requested in the encoding requested or false. If $len is not set, returns substring from $begin to end of string. |
public static strripos ( $haysack, $needle, $offset, $use_enc = null ) : mixed | ||
$haysack | string. The string being checked. | |
$offset | integer. The search offset. If it is not specified, 0 is used. | |
$use_enc | string. The encoding to be used. If not set, the internal encoding will be used. | |
Результат | mixed | The section of the source string requested in the encoding requested or false. If $len is not set, returns substring from $begin to end of string. |
public static strrpos ( $haysack, $needle, $offset, $use_enc = null ) : mixed | ||
$haysack | string. The string being checked. | |
$offset | integer. The search offset. If it is not specified, 0 is used. | |
$use_enc | string. The encoding to be used. If not set, the internal encoding will be used. | |
Результат | mixed | The section of the source string requested in the encoding requested or false. If $len is not set, returns substring from $begin to end of string. |
public static strtolower ( $str, $use_enc = null ) : string. | ||
$str | string. The string to lowercase | |
$use_enc | string. The encoding to be used. If not set, the internal encoding will be used. | |
Результат | string. |
public static strtoupper ( $str, $use_enc = null ) : string. | ||
$str | string. The string to uppercase | |
$use_enc | string. The encoding to be used. If not set, the internal encoding will be used. | |
Результат | string. |
public static substr ( $str, $begin, $len = null, $use_enc = null ) : mixed | ||
$str | string. The original string | |
$len | integer. How long the returned string should be. If $len is not set, the section of the string from $begin to the end of the string is returned. | |
$use_enc | string. The encoding to be used. If not set, the internal encoding will be used. | |
Результат | mixed | The section of the source string requested in the encoding requested or false. If $len is not set, returns substring from $begin to end of string. |