本文共 797 字,大约阅读时间需要 2 分钟。
ctype函数
ctype_upper() function is a character type (CType) function in PHP, it is used to check whether a given string contains all uppercase characters or not.
ctype_upper()函数是PHP中的字符类型(CType)函数,用于检查给定的字符串是否包含所有大写字符。
It returns true, if all characters of the given strings are in uppercase, else it returns false.
它返回true,如果给定字符串的所有字符都是大写的,否则返回FALSE。
Syntax:
句法:
ctype_upper(string) : bool
Example:
例:
Input: "HELLO" Output: true Input: "HELLO WORLD" Output: false Input: "Hello" Output: false
PHP code:
PHP代码:
Output
输出量
HELLO contains all uppercase characters.HELLO WORLD does not contain all uppercase characters.HELLO123 does not contain all uppercase characters.Hello does not contain all uppercase characters.
翻译自:
ctype函数
转载地址:http://anvzd.baihongyu.com/