|
@@ 4432-4442 (lines=11) @@
|
| 4429 |
|
self::checkForSupport(); |
| 4430 |
|
} |
| 4431 |
|
|
| 4432 |
|
if (self::$support['mbstring'] === true) { |
| 4433 |
|
|
| 4434 |
|
// INFO: this is only a fallback for old versions |
| 4435 |
|
if ($encoding === 'UTF-8' || $encoding === true || $encoding === false) { |
| 4436 |
|
$encoding = 'UTF-8'; |
| 4437 |
|
} else { |
| 4438 |
|
$encoding = self::normalize_encoding($encoding); |
| 4439 |
|
} |
| 4440 |
|
|
| 4441 |
|
return \mb_strpos($haystack, $needle, $offset, $encoding); |
| 4442 |
|
} |
| 4443 |
|
|
| 4444 |
|
if (self::$support['iconv'] === true) { |
| 4445 |
|
// ignore invalid negative offset to keep compatility |
|
@@ 4930-4940 (lines=11) @@
|
| 4927 |
|
self::checkForSupport(); |
| 4928 |
|
} |
| 4929 |
|
|
| 4930 |
|
if (self::$support['mbstring'] === true) { |
| 4931 |
|
|
| 4932 |
|
// INFO: this is only a fallback for old versions |
| 4933 |
|
if ($encoding === 'UTF-8' || $encoding === true || $encoding === false) { |
| 4934 |
|
$encoding = 'UTF-8'; |
| 4935 |
|
} else { |
| 4936 |
|
$encoding = self::normalize_encoding($encoding); |
| 4937 |
|
} |
| 4938 |
|
|
| 4939 |
|
return \mb_substr($str, $start, $length, $encoding); |
| 4940 |
|
} |
| 4941 |
|
|
| 4942 |
|
if (self::$support['iconv'] === true) { |
| 4943 |
|
return (string)\grapheme_substr($str, $start, $length); |