<?php
header('Content-Type:text/html; Charset=utf-8');
function mb_str_split( $string ) {
return implode('', array_unique(preg_split('/(?<!^)(?!$)/u', $string )));
}
$string = '过过过过过ggggg年年年nnnnnn啦啦啦啦啦啦lllll';
$charlist = mb_str_split( $string );
echo $charlist;
php过滤字符串中重复的字符(包含中文)
最新推荐文章于 2021-04-07 00:38:34 发布
