Lines Matching full:s

20  * - mb_convert_variables    - Convert character code in variable(s)
74 …['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', …
81 public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) argument
84 $fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
92 $s = base64_decode($s);
97 return base64_encode($s);
105 $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s);
108 … return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s);
112 $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8');
116 return iconv($fromEncoding, $toEncoding.'//IGNORE', $s);
131 public static function mb_decode_mimeheader($s) argument
133 return iconv_mime_decode($s, 2, self::$internalEncoding);
136 …public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefe… argument
141 public static function mb_decode_numericentity($s, $convmap, $encoding = null) argument
143 … if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
144 …or('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_W…
154 …or('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_W…
159 $s = (string) $s;
160 if ('' === $s) {
168 if (!preg_match('//u', $s)) {
169 $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
172 $s = iconv($encoding, 'UTF-8//IGNORE', $s);
183 …$s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use …
192 }, $s);
195 return $s;
198 return iconv('UTF-8', $encoding.'//IGNORE', $s);
201 public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) argument
203 … if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) {
204 …or('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_W…
214 …or('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_W…
220 …r('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_W…
225 $s = (string) $s;
226 if ('' === $s) {
234 if (!preg_match('//u', $s)) {
235 $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
238 $s = iconv($encoding, 'UTF-8//IGNORE', $s);
245 $len = \strlen($s);
249 $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
250 $uchr = substr($s, $i, $ulen);
271 public static function mb_convert_case($s, $mode, $encoding = null) argument
273 $s = (string) $s;
274 if ('' === $s) {
282 if (!preg_match('//u', $s)) {
283 $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
286 $s = iconv($encoding, 'UTF-8//IGNORE', $s);
294 $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s);
308 $s = strtr($s, $caseFolding);
321 $len = \strlen($s);
324 $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"];
325 $uchr = substr($s, $i, $ulen);
335 $s[--$nlen] = $uchr[--$ulen];
338 $s = substr_replace($s, $uchr, $i - $ulen, $ulen);
347 return $s;
350 return iconv('UTF-8', $encoding.'//IGNORE', $s);
371 …throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $enc…
392 …throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lan…
508 public static function mb_strlen($s, $encoding = null) argument
512 return \strlen($s);
515 return @iconv_strlen($s, $encoding);
609 public static function mb_strtolower($s, $encoding = null) argument
611 return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding);
614 public static function mb_strtoupper($s, $encoding = null) argument
616 return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding);
637 public static function mb_substr($s, $start, $length = null, $encoding = null) argument
641 return (string) substr($s, $start, null === $length ? 2147483647 : $length);
645 $start = iconv_strlen($s, $encoding) + $start;
654 $length = iconv_strlen($s, $encoding) + $length - $start;
660 return (string) iconv_substr($s, $start, $length, $encoding);
764 public static function mb_strwidth($s, $encoding = null) argument
769 $s = iconv($encoding, 'UTF-8//IGNORE', $s);
772s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x…
774 return ($wide << 1) + iconv_strlen($s, 'UTF-8');
790 $s = \chr($code);
792 $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
794 $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
796 …$s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(…
800 $s = mb_convert_encoding($s, $encoding, 'UTF-8');
803 return $s;
806 public static function mb_ord($s, $encoding = null) argument
809 $s = mb_convert_encoding($s, 'UTF-8', $encoding);
812 if (1 === \strlen($s)) {
813 return \ord($s);
816 $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
818 … return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
821 return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
824 return (($code - 0xC0) << 6) + $s[2] - 0x80;
843 …(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
848 …(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
911 private static function title_case(array $s) argument
913 …return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE…