function Mbstring::mb_strpos
1 call to Mbstring::mb_strpos()
- Mbstring::mb_stripos in vendor/
symfony/ polyfill-mbstring/ Mbstring.php
File
-
vendor/
symfony/ polyfill-mbstring/ Mbstring.php, line 525
Class
- Mbstring
- Partial mbstring implementation in PHP, iconv based, UTF-8 centric.
Namespace
Symfony\Polyfill\MbstringCode
public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) {
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
return strpos($haystack, $needle, $offset);
}
$needle = (string) $needle;
if ('' === $needle) {
if (80000 > \PHP_VERSION_ID) {
trigger_error(__METHOD__ . ': Empty delimiter', \E_USER_WARNING);
return false;
}
return 0;
}
return iconv_strpos($haystack, $needle, $offset, $encoding);
}