?php
str = '宋萨呀';
head = mb_substr($str,0,1,'utf-8');
foot = mb_substr($str,-1,1,'utf-8');
length = mb_strlen($str,'utf-8')-2;
star_length = str_repeat('*',$length);
cho $res = $head .$star_length.$foot;
?php
str = '宋萨呀';
head = mb_substr($str,0,1,'utf-8');
foot = mb_substr($str,-1,1,'utf-8');
length = mb_strlen($str,'utf-8')-2;
star_length = str_repeat('*',$length);
cho $res = $head .$star_length.$foot;
本文标题:十一、隐藏姓名
本文链接:https://www.haomeiwen.com/subject/nnfmcxtx.html
网友评论