yii\helpers\BaseStringHelper::byteSubstr PHP 메소드

byteSubstr() 공개 정적인 메소드

This method ensures the string is treated as a byte array by using mb_substr().
또한 보기: 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.
리턴 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');
    }