中文截取无乱码

mac2022-06-30  83

/* *中文截取无乱码 */ function showsubstr_chinese($str, $start, $length = null) { return join("", array_slice( preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY), $start, $length)); }

 

转载于:https://www.cnblogs.com/hgj123/p/4544851.html

相关资源:JAVA上百实例源码以及开源项目
最新回复(0)