查看字符串是否包含所有大写字母的最佳方法是什么?如果字符串还包含符号或数字,我仍然希望函数返回true。
检查是否strtoupper($str) == $str
strtoupper($str) == $str
要处理非 ascii,请使用:
mb_strtoupper($str, 'utf-8') == $str
ctype_upper(字符串$testString)