You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
4.8 KiB

  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. use Symfony\Polyfill\Mbstring as p;
  11. if (!defined('MB_CASE_UPPER')) {
  12. define('MB_CASE_UPPER', 0);
  13. define('MB_CASE_LOWER', 1);
  14. define('MB_CASE_TITLE', 2);
  15. }
  16. if (!function_exists('mb_strlen')) {
  17. function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); }
  18. function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); }
  19. function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); }
  20. function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); }
  21. function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); }
  22. function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); }
  23. function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); }
  24. function mb_language($lang = null) { return p\Mbstring::mb_language($lang); }
  25. function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); }
  26. function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); }
  27. function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); }
  28. function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); }
  29. function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); }
  30. function mb_parse_str($s, &$result = array()) { parse_str($s, $result); }
  31. function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); }
  32. function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); }
  33. function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); }
  34. function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); }
  35. function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); }
  36. function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); }
  37. function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); }
  38. function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); }
  39. function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); }
  40. function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); }
  41. function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); }
  42. function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); }
  43. function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); }
  44. function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); }
  45. function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); }
  46. function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); }
  47. function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); }
  48. function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); }
  49. function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); }
  50. function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); }
  51. }
  52. if (!function_exists('mb_chr')) {
  53. function mb_ord($s, $enc = null) { return p\Mbstring::mb_ord($s, $enc); }
  54. function mb_chr($code, $enc = null) { return p\Mbstring::mb_chr($code, $enc); }
  55. function mb_scrub($s, $enc = null) { $enc = null === $enc ? mb_internal_encoding() : $enc; return mb_convert_encoding($s, $enc, $enc); }
  56. }
  57. if (!function_exists('mb_str_split')) {
  58. function mb_str_split($string, $split_length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $split_length, $encoding); }
  59. }