1<?php
2
3/*
4 * Copyright (C) 2016 Nicolas Grekas - p@tchwork.com
5 *
6 * This library is free software; you can redistribute it and/or modify it
7 * under the terms of the (at your option):
8 * Apache License v2.0 (http://apache.org/licenses/LICENSE-2.0.txt), or
9 * GNU General Public License v2.0 (http://gnu.org/licenses/gpl-2.0.txt).
10 */
11
12use Patchwork\PHP\Shim as s;
13
14const MB_OVERLOAD_MAIL = 1;
15const MB_OVERLOAD_STRING = 2;
16const MB_OVERLOAD_REGEX = 4;
17const MB_CASE_UPPER = 0;
18const MB_CASE_LOWER = 1;
19const MB_CASE_TITLE = 2;
20
21@trigger_error('You are using a fallback implementation of the mbstring extension. Installing the native one is highly recommended instead.', E_USER_DEPRECATED);
22
23function mb_convert_encoding($s, $to, $from = null) {return s\Mbstring::mb_convert_encoding($s, $to, $from);}
24function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) {return s\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f);}
25function mb_decode_mimeheader($s) {return s\Mbstring::mb_decode_mimeheader($s);}
26function mb_encode_mimeheader($s, $charset = null, $transfer_enc = null, $lf = null, $indent = null) {return s\Mbstring::mb_encode_mimeheader($s, $charset, $transfer_enc, $lf, $indent);}
27function mb_convert_case($s, $mode, $enc = null) {return s\Mbstring::mb_convert_case($s, $mode, $enc);}
28function mb_internal_encoding($enc = null) {return s\Mbstring::mb_internal_encoding($enc);}
29function mb_language($lang = null) {return s\Mbstring::mb_language($lang);}
30function mb_list_encodings() {return s\Mbstring::mb_list_encodings();}
31function mb_encoding_aliases($encoding) {return s\Mbstring::mb_encoding_aliases($encoding);}
32function mb_check_encoding($var = null, $encoding = null) {return s\Mbstring::mb_check_encoding($var, $encoding);}
33function mb_detect_encoding($str, $encoding_list = null, $strict = false) {return s\Mbstring::mb_detect_encoding($str, $encoding_list, $strict);}
34function mb_detect_order($encoding_list = null) {return s\Mbstring::mb_detect_order($encoding_list);}
35function mb_parse_str($s, &$result = array()) {parse_str($s, $result);}
36function mb_strlen($s, $enc = null) {return s\Mbstring::mb_strlen($s, $enc);}
37function mb_strpos($s, $needle, $offset = 0, $enc = null) {return s\Mbstring::mb_strpos($s, $needle, $offset, $enc);}
38function mb_strtolower($s, $enc = null) {return s\Mbstring::mb_strtolower($s, $enc);}
39function mb_strtoupper($s, $enc = null) {return s\Mbstring::mb_strtoupper($s, $enc);}
40function mb_substitute_character($char = null) {return s\Mbstring::mb_substitute_character($char);}
41function mb_substr($s, $start, $length = 2147483647, $enc = null) {return s\Mbstring::mb_substr($s, $start, $length, $enc);}
42function mb_stripos($s, $needle, $offset = 0, $enc = null) {return s\Mbstring::mb_stripos($s, $needle, $offset, $enc);}
43function mb_stristr($s, $needle, $part = false, $enc = null) {return s\Mbstring::mb_stristr($s, $needle, $part, $enc);}
44function mb_strrchr($s, $needle, $part = false, $enc = null) {return s\Mbstring::mb_strrchr($s, $needle, $part, $enc);}
45function mb_strrichr($s, $needle, $part = false, $enc = null) {return s\Mbstring::mb_strrichr($s, $needle, $part, $enc);}
46function mb_strripos($s, $needle, $offset = 0, $enc = null) {return s\Mbstring::mb_strripos($s, $needle, $offset, $enc);}
47function mb_strrpos($s, $needle, $offset = 0, $enc = null) {return s\Mbstring::mb_strrpos($s, $needle, $offset, $enc);}
48function mb_strstr($s, $needle, $part = false, $enc = null) {return s\Mbstring::mb_strstr($s, $needle, $part, $enc);}
49function mb_get_info($type = 'all') {return s\Mbstring::mb_get_info($type);}
50function mb_http_output($enc = null) {return s\Mbstring::mb_http_output($enc);}
51function mb_strwidth($s, $enc = null) {return s\Mbstring::mb_strwidth($s, $enc);}
52function mb_substr_count($haystack, $needle, $enc = null) {return s\Mbstring::mb_substr_count($haystack, $needle, $enc);}
53function mb_output_handler($contents, $status) {return s\Mbstring::mb_output_handler($contents, $status);}
54function mb_http_input($type = '') {return s\Mbstring::mb_http_input($type);}
55