yii\helpers\BaseStringHelper::byteSubstr PHP Method

byteSubstr() public static method

This method ensures the string is treated as a byte array by using mb_substr().
See also: http://www.php.net/manual/en/function.substr.php
public static byteSubstr ( string $string, integer $start, integer $length = null ) : string
$string string the input string. Must be one character or longer.
$start integer the starting position
$length integer the desired portion length. If not specified or `null`, there will be no limit on length i.e. the output will be until the end of the string.
return string the extracted part of string, or FALSE on failure or an empty string.
    public static function byteSubstr($string, $start, $length = null)
    {
        return mb_substr($string, $start, $length === null ? mb_strlen($string, '8bit') : $length, '8bit');
    }