属性 |
值 |
命名空间 |
fize\security |
类名 |
Ctype |
判断是否全部为字母和(或)数字字符。
public static function alnum (
string $text
) : bool
判断字符串是否为全字母
public static function alpha (
string $text
) : bool
判断是不是都是控制字符。
public static function cntrl (
string $text
) : bool
控制字符就是例如:换行、缩进、空格。
判断提供的字符串是不是纯数字。
public static function digit (
string $text
) : bool
注意传入的必须是 string 类型,传入 int 会导致判断错误。
做可打印字符串检测,空格除外
public static function graph (
string $text
) : bool
做小写字符检测
public static function lower (
string $text
) : bool
做可打印字符检测
public static function print (
string $text
) : bool
检测可打印的字符是不是不包含空白、数字和字母
public static function punct (
string $text
) : bool
做空白字符检测
public static function space (
string $text
) : bool
做大写字母检测
public static function upper (
string $text
) : bool
检测字符串是否只包含十六进制字符
public static function xdigit (
string $text
) : bool