Returns true
if the given string is upper case, false otherwise.
Convert the given string to upper case, using strtoupper
and compare it to the original.
代码实现
function isUpperCase($string)
{
return $string === strtoupper($string);
}
使用样例
isUpperCase('MORNING SHOWS THE DAY!'); // true
isUpperCase('qUick Fox'); // false