Partial mbstring implementation in PHP, iconv based, UTF-8 centric.

Implemented:

  • mb_chr - Returns a specific character from its Unicode code point
  • mb_convert_encoding - Convert character encoding
  • mb_convert_variables - Convert character code in variable(s)
  • mb_decode_mimeheader - Decode string in MIME header field
  • mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED
  • mb_decode_numericentity - Decode HTML numeric string reference to character
  • mb_encode_numericentity - Encode character to HTML numeric string reference
  • mb_convert_case - Perform case folding on a string
  • mb_detect_encoding - Detect character encoding
  • mb_get_info - Get internal settings of mbstring
  • mb_http_input - Detect HTTP input character encoding
  • mb_http_output - Set/Get HTTP output character encoding
  • mb_internal_encoding - Set/Get internal character encoding
  • mb_list_encodings - Returns an array of all supported encodings
  • mb_ord - Returns the Unicode code point of a character
  • mb_output_handler - Callback function converts character encoding in output buffer
  • mb_scrub - Replaces ill-formed byte sequences with substitute characters
  • mb_strlen - Get string length
  • mb_strpos - Find position of first occurrence of string in a string
  • mb_strrpos - Find position of last occurrence of a string in a string
  • mb_str_split - Convert a string to an array
  • mb_strtolower - Make a string lowercase
  • mb_strtoupper - Make a string uppercase
  • mb_substitute_character - Set/Get substitution character
  • mb_substr - Get part of string
  • mb_stripos - Finds position of first occurrence of a string within another, case insensitive
  • mb_stristr - Finds first occurrence of a string within another, case insensitive
  • mb_strrchr - Finds the last occurrence of a character in a string within another
  • mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
  • mb_strripos - Finds position of last occurrence of a string within another, case insensitive
  • mb_strstr - Finds first occurrence of a string within another
  • mb_strwidth - Return width of string
  • mb_substr_count - Count the number of substring occurrences

Not implemented:

  • mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more)
  • mbereg* - Regular expression with multibyte support
  • mb_parse_str - Parse GET/POST/COOKIE data and set global variable
  • mb_preferred_mime_name - Get MIME charset string
  • mb_regex_encoding - Returns current encoding for multibyte regex as string
  • mb_regex_set_options - Set/Get the default options for mbregex functions
  • mb_send_mail - Send encoded mail
  • mb_split - Split multibyte string using regular expression
  • mb_strcut - Get part of string
  • mb_strimwidth - Get truncated string with specified width
CloneableFinalInstantiable
Constants
public Symfony\Polyfill\Mbstring\Mbstring::MB_CASE_FOLD = 9223372036854775807
Methods
public static mb_check_encoding( $var = NULL, $encoding = NULL)
public static mb_chr( $code, $encoding = NULL)
public static mb_convert_case( $s, $mode, $encoding = NULL)
public static mb_convert_encoding( $s, $toEncoding, $fromEncoding = NULL)
public static mb_convert_variables( $toEncoding, $fromEncoding, $a = NULL, $b = NULL, $c = NULL, $d = NULL, $e = NULL, $f = NULL)
public static mb_decode_mimeheader( $s)
public static mb_decode_numericentity( $s, $convmap, $encoding = NULL)
public static mb_detect_encoding( $str, $encodingList = NULL, $strict = false)
public static mb_detect_order( $encodingList = NULL)
public static mb_encode_mimeheader( $s, $charset = NULL, $transferEncoding = NULL, $linefeed = NULL, $indent = NULL)
public static mb_encode_numericentity( $s, $convmap, $encoding = NULL, $is_hex = false)
public static mb_encoding_aliases( $encoding)
public static mb_get_info( $type = 'all')
public static mb_http_input( $type = '')
public static mb_http_output( $encoding = NULL)
public static mb_internal_encoding( $encoding = NULL)
public static mb_language( $lang = NULL)
public static mb_list_encodings()
public static mb_ord( $s, $encoding = NULL)
public static mb_output_handler( $contents, $status)
public static mb_str_split( $string, $split_length = 1, $encoding = NULL)
public static mb_stripos( $haystack, $needle, $offset = 0, $encoding = NULL)
public static mb_stristr( $haystack, $needle, $part = false, $encoding = NULL)
public static mb_strlen( $s, $encoding = NULL)
public static mb_strpos( $haystack, $needle, $offset = 0, $encoding = NULL)
public static mb_strrchr( $haystack, $needle, $part = false, $encoding = NULL)
public static mb_strrichr( $haystack, $needle, $part = false, $encoding = NULL)
public static mb_strripos( $haystack, $needle, $offset = 0, $encoding = NULL)
public static mb_strrpos( $haystack, $needle, $offset = 0, $encoding = NULL)
public static mb_strstr( $haystack, $needle, $part = false, $encoding = NULL)
public static mb_strtolower( $s, $encoding = NULL)
public static mb_strtoupper( $s, $encoding = NULL)
public static mb_strwidth( $s, $encoding = NULL)
public static mb_substitute_character( $c = NULL)
public static mb_substr( $s, $start, $length = NULL, $encoding = NULL)
public static mb_substr_count( $haystack, $needle, $encoding = NULL)
Properties
private static $caseFold = [['µ', 'ſ', 'ͅ', 'ς', 'ϐ', 'ϑ', 'ϕ', 'ϖ', 'ϰ', 'ϱ', 'ϵ', 'ẛ', 'ι'], ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', 'ṡ', 'ι']]
private static $encodingList = ['ASCII', 'UTF-8']
private static $internalEncoding = 'UTF-8'
private static $language = 'neutral'
Methods
private static getData( $file)
private static getEncoding( $encoding)
private static getSubpart( $pos, $part, $haystack, $encoding)
private static html_encoding_callback(array $m)
private static title_case(array $s)
Properties
private static $caseFold = [['µ', 'ſ', 'ͅ', 'ς', 'ϐ', 'ϑ', 'ϕ', 'ϖ', 'ϰ', 'ϱ', 'ϵ', 'ẛ', 'ι'], ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', 'ṡ', 'ι']]
private static $encodingList = ['ASCII', 'UTF-8']
private static $internalEncoding = 'UTF-8'
private static $language = 'neutral'
Methods
private static getData( $file)
private static getEncoding( $encoding)
private static getSubpart( $pos, $part, $haystack, $encoding)
private static html_encoding_callback(array $m)
public static mb_check_encoding( $var = NULL, $encoding = NULL)
public static mb_chr( $code, $encoding = NULL)
public static mb_convert_case( $s, $mode, $encoding = NULL)
public static mb_convert_encoding( $s, $toEncoding, $fromEncoding = NULL)
public static mb_convert_variables( $toEncoding, $fromEncoding, $a = NULL, $b = NULL, $c = NULL, $d = NULL, $e = NULL, $f = NULL)
public static mb_decode_mimeheader( $s)
public static mb_decode_numericentity( $s, $convmap, $encoding = NULL)
public static mb_detect_encoding( $str, $encodingList = NULL, $strict = false)
public static mb_detect_order( $encodingList = NULL)
public static mb_encode_mimeheader( $s, $charset = NULL, $transferEncoding = NULL, $linefeed = NULL, $indent = NULL)
public static mb_encode_numericentity( $s, $convmap, $encoding = NULL, $is_hex = false)
public static mb_encoding_aliases( $encoding)
public static mb_get_info( $type = 'all')
public static mb_http_input( $type = '')
public static mb_http_output( $encoding = NULL)
public static mb_internal_encoding( $encoding = NULL)
public static mb_language( $lang = NULL)
public static mb_list_encodings()
public static mb_ord( $s, $encoding = NULL)
public static mb_output_handler( $contents, $status)
public static mb_str_split( $string, $split_length = 1, $encoding = NULL)
public static mb_stripos( $haystack, $needle, $offset = 0, $encoding = NULL)
public static mb_stristr( $haystack, $needle, $part = false, $encoding = NULL)
public static mb_strlen( $s, $encoding = NULL)
public static mb_strpos( $haystack, $needle, $offset = 0, $encoding = NULL)
public static mb_strrchr( $haystack, $needle, $part = false, $encoding = NULL)
public static mb_strrichr( $haystack, $needle, $part = false, $encoding = NULL)
public static mb_strripos( $haystack, $needle, $offset = 0, $encoding = NULL)
public static mb_strrpos( $haystack, $needle, $offset = 0, $encoding = NULL)
public static mb_strstr( $haystack, $needle, $part = false, $encoding = NULL)
public static mb_strtolower( $s, $encoding = NULL)
public static mb_strtoupper( $s, $encoding = NULL)
public static mb_strwidth( $s, $encoding = NULL)
public static mb_substitute_character( $c = NULL)
public static mb_substr( $s, $start, $length = NULL, $encoding = NULL)
public static mb_substr_count( $haystack, $needle, $encoding = NULL)
private static title_case(array $s)
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only