当前位置:网站首页>Hide Chinese name
Hide Chinese name
2022-07-05 13:43:00 【Php_ XiaoZhi】
/** * Only the first and last characters of the string are reserved , Hide intermediate use * Instead of ( Only the first one is displayed when there are two characters ) * @param string $user_name full name * @return string Formatted name */ function substr_cut($user_name){ $strlen = mb_strlen($user_name, 'utf-8'); $firstStr = mb_substr($user_name, 0, 1, 'utf-8'); $lastStr = mb_substr($user_name, -1, 1, 'utf-8'); return $strlen == 2 ? $firstStr . str_repeat('*', mb_strlen($user_name, 'utf-8') - 1) : $firstStr . str_repeat("*", $strlen - 2) . $lastStr; }
边栏推荐
- Jetpack Compose入门到精通
- 龙芯派2代烧写PMON和重装系统
- leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
- [深度学习论文笔记]TransBTSV2: Wider Instead of Deeper Transformer for Medical Image Segmentation
- 今年上半年,通信行业发生了哪些事?
- Datapipeline was selected into the 2022 digital intelligence atlas and database development report of China Academy of communications and communications
- Don't know these four caching modes, dare you say you understand caching?
- Zhubo Huangyu: these spot gold investment skills are not really bad
- Kotlin协程利用CoroutineContext实现网络请求失败后重试逻辑
- Personal component - message prompt
猜你喜欢
French scholars: the explicability of counter attack under optimal transmission theory
【华南理工大学】考研初试复试资料分享
Mmseg - Mutli view time series data inspection and visualization
[notes of in-depth study paper]transbtsv2: wider instead of deep transformer for medical image segmentation
Nantong online communication group
zabbix 监控
嵌入式软件架构设计-消息交互
MMSeg——Mutli-view时序数据检查与可视化
山东大学暑期实训一20220620
FPGA learning notes: vivado 2019.1 add IP MicroBlaze
随机推荐
53. 最大子数组和:给你一个整数数组 nums ,请你找出一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。
MySQL get time
redis6事务和锁机制
leetcode 10. Regular Expression Matching 正则表达式匹配 (困难)
zabbix 监控
Prefix, infix, suffix expression "recommended collection"
一网打尽异步神器CompletableFuture
“百度杯”CTF比赛 九月场,Web:SQL
Record in-depth learning - some bug handling
Idea set method annotation and class annotation
49. 字母异位词分组:给你一个字符串数组,请你将 字母异位词 组合在一起。可以按任意顺序返回结果列表。 字母异位词 是由重新排列源单词的字母得到的一个新单词,所有源单词中的字母通常恰好只用一次。
Binder communication process and servicemanager creation process
Win10 - lightweight gadget
French scholars: the explicability of counter attack under optimal transmission theory
Rocky basic command 3
Flutter draws animation effects of wave movement, curves and line graphs
Godson 2nd generation burn PMON and reload system
[深度学习论文笔记]使用多模态MR成像分割脑肿瘤的HNF-Netv2
[deep learning paper notes] hnf-netv2 for segmentation of brain tumors using multimodal MR imaging
Personal component - message prompt