Laravel and CI frames intercept string functions, Laravelci
Laravel:
function limit ($value, $limit = +, $end = ' ... ') { if (mb_strwidth ($value, ' UTF-8 ') <= $limit) { return $value ; } return RTrim (mb_strimwidth ($value, 0, $limit, ' ', ' UTF-8 ')). $end;}
Ci:
function Word_limiter ($str, $limit = N, $end _char = ' ... ') { if (trim ($str) = = =) { return $str; } Preg_match ('/^\s*+ (?: \ s++\s*+) {1, '. ( int) $limit. '} /', $STR, $matches); if (strlen ($str) = = = strlen ($matches [0])) { $end _char = '; } return RTrim ($matches [0]). $end _char;}
http://www.bkjia.com/PHPjc/1123782.html www.bkjia.com true http://www.bkjia.com/PHPjc/1123782.html techarticle Laravel and CI frames intercept string functions, Laravelci laravel:function limit ($value, $limit = $end, = ' ... ') {if (Mb_strwidth ($value, ' U TF-8 ') = $limit) {return $value;} ...