Файл: adultscript-2.0.3-pro/files/libraries/framework/multibyte/strpos.php
Строк: 18
<?php
defined('_VALID') or die('Restricted Access!');
function _utf8_strpos($str, $needle, $offset = NULL)
{
if ( is_null($offset) ) {
$ar = explode($needle, $str, 2);
if (count($ar) > 1) {
return utf8_strlen($ar['0']);
}
return false;
} else {
if (!is_int($offset)) {
trigger_error('utf8_strpos: Offset must be an integer',E_USER_ERROR);
return false;
}
$str = utf8_substr($str, $offset);
if (false !== ($pos = utf8_strpos($str, $needle))) {
return $pos + $offset;
}
return false;
}
}
?>