php实现按utf8编码对字符串进行分割

<?php
function mb_str_split( $string ) { 
    # Split at all position not after the start: ^ 
    # and not before the end: $ 
    return preg_split('/(?<!^)(?!$)/u', $string ); 
} 
?>

posted on 2012-08-02 15:54  ianarfa  阅读(266)  评论(0编辑  收藏  举报

导航