\Symfony\Polyfill\MbstringMbstring

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

Summary

Methods
Properties
Constants
mb_convert_encoding()
mb_convert_variables()
mb_decode_mimeheader()
mb_encode_mimeheader()
mb_decode_numericentity()
mb_encode_numericentity()
mb_convert_case()
mb_internal_encoding()
mb_language()
mb_list_encodings()
mb_encoding_aliases()
mb_check_encoding()
mb_detect_encoding()
mb_detect_order()
mb_strlen()
mb_strpos()
mb_strrpos()
mb_str_split()
mb_strtolower()
mb_strtoupper()
mb_substitute_character()
mb_substr()
mb_stripos()
mb_stristr()
mb_strrchr()
mb_strrichr()
mb_strripos()
mb_strstr()
mb_get_info()
mb_http_input()
mb_http_output()
mb_strwidth()
mb_substr_count()
mb_output_handler()
mb_chr()
mb_ord()
No public properties found
MB_CASE_FOLD
No protected methods found
No protected properties found
N/A
getSubpart()
html_encoding_callback()
title_case()
getData()
getEncoding()
$encodingList
$language
$internalEncoding
$caseFold
N/A

Constants

MB_CASE_FOLD

MB_CASE_FOLD = PHP_INT_MAX

Properties

$encodingList

$encodingList : 

Type

$language

$language : 

Type

$internalEncoding

$internalEncoding : 

Type

$caseFold

$caseFold : 

Type

Methods

mb_convert_encoding()

mb_convert_encoding(  $s,   $toEncoding,   $fromEncoding = null) 

Parameters

$s
$toEncoding
$fromEncoding

mb_convert_variables()

mb_convert_variables(  $toEncoding,   $fromEncoding,   $a = null,   $b = null,   $c = null,   $d = null,   $e = null,   $f = null) 

Parameters

$toEncoding
$fromEncoding
$a
$b
$c
$d
$e
$f

mb_decode_mimeheader()

mb_decode_mimeheader(  $s) 

Parameters

$s

mb_encode_mimeheader()

mb_encode_mimeheader(  $s,   $charset = null,   $transferEncoding = null,   $linefeed = null,   $indent = null) 

Parameters

$s
$charset
$transferEncoding
$linefeed
$indent

mb_decode_numericentity()

mb_decode_numericentity(  $s,   $convmap,   $encoding = null) 

Parameters

$s
$convmap
$encoding

mb_encode_numericentity()

mb_encode_numericentity(  $s,   $convmap,   $encoding = null,   $is_hex = false) 

Parameters

$s
$convmap
$encoding
$is_hex

mb_convert_case()

mb_convert_case(  $s,   $mode,   $encoding = null) 

Parameters

$s
$mode
$encoding

mb_internal_encoding()

mb_internal_encoding(  $encoding = null) 

Parameters

$encoding

mb_language()

mb_language(  $lang = null) 

Parameters

$lang

mb_list_encodings()

mb_list_encodings() 

mb_encoding_aliases()

mb_encoding_aliases(  $encoding) 

Parameters

$encoding

mb_check_encoding()

mb_check_encoding(  $var = null,   $encoding = null) 

Parameters

$var
$encoding

mb_detect_encoding()

mb_detect_encoding(  $str,   $encodingList = null,   $strict = false) 

Parameters

$str
$encodingList
$strict

mb_detect_order()

mb_detect_order(  $encodingList = null) 

Parameters

$encodingList

mb_strlen()

mb_strlen(  $s,   $encoding = null) 

Parameters

$s
$encoding

mb_strpos()

mb_strpos(  $haystack,   $needle,   $offset,   $encoding = null) 

Parameters

$haystack
$needle
$offset
$encoding

mb_strrpos()

mb_strrpos(  $haystack,   $needle,   $offset,   $encoding = null) 

Parameters

$haystack
$needle
$offset
$encoding

mb_str_split()

mb_str_split(  $string,   $split_length = 1,   $encoding = null) 

Parameters

$string
$split_length
$encoding

mb_strtolower()

mb_strtolower(  $s,   $encoding = null) 

Parameters

$s
$encoding

mb_strtoupper()

mb_strtoupper(  $s,   $encoding = null) 

Parameters

$s
$encoding

mb_substitute_character()

mb_substitute_character(  $c = null) 

Parameters

$c

mb_substr()

mb_substr(  $s,   $start,   $length = null,   $encoding = null) 

Parameters

$s
$start
$length
$encoding

mb_stripos()

mb_stripos(  $haystack,   $needle,   $offset,   $encoding = null) 

Parameters

$haystack
$needle
$offset
$encoding

mb_stristr()

mb_stristr(  $haystack,   $needle,   $part = false,   $encoding = null) 

Parameters

$haystack
$needle
$part
$encoding

mb_strrchr()

mb_strrchr(  $haystack,   $needle,   $part = false,   $encoding = null) 

Parameters

$haystack
$needle
$part
$encoding

mb_strrichr()

mb_strrichr(  $haystack,   $needle,   $part = false,   $encoding = null) 

Parameters

$haystack
$needle
$part
$encoding

mb_strripos()

mb_strripos(  $haystack,   $needle,   $offset,   $encoding = null) 

Parameters

$haystack
$needle
$offset
$encoding

mb_strstr()

mb_strstr(  $haystack,   $needle,   $part = false,   $encoding = null) 

Parameters

$haystack
$needle
$part
$encoding

mb_get_info()

mb_get_info(  $type = 'all') 

Parameters

$type

mb_http_input()

mb_http_input(  $type = '') 

Parameters

$type

mb_http_output()

mb_http_output(  $encoding = null) 

Parameters

$encoding

mb_strwidth()

mb_strwidth(  $s,   $encoding = null) 

Parameters

$s
$encoding

mb_substr_count()

mb_substr_count(  $haystack,   $needle,   $encoding = null) 

Parameters

$haystack
$needle
$encoding

mb_output_handler()

mb_output_handler(  $contents,   $status) 

Parameters

$contents
$status

mb_chr()

mb_chr(  $code,   $encoding = null) 

Parameters

$code
$encoding

mb_ord()

mb_ord(  $s,   $encoding = null) 

Parameters

$s
$encoding

getSubpart()

getSubpart(  $pos,   $part,   $haystack,   $encoding) 

Parameters

$pos
$part
$haystack
$encoding

html_encoding_callback()

html_encoding_callback(array  $m) 

Parameters

array $m

title_case()

title_case(array  $s) 

Parameters

array $s

getData()

getData(  $file) 

Parameters

$file

getEncoding()

getEncoding(  $encoding) 

Parameters

$encoding