ctype---php中被遗忘字符串处理的函数
2011-03-25 14:17
183 查看
要用的地方还是比较多。
ctype_alnum
-- Check for alphanumeric character(s)
检测是否是只包含[A-Za-z0-9]
函数原型: boll ctype_alnum(string text);
ctype_alpha
-- Check for alphabetic character(s)
检测是否是只包含[A-Za-z]
函数原型: boll ctype_
alpha
(string text);
ctype_cntrl
-- Check for control character(s)
检查是否是只包含类是“
”之类的字符控制字符
函数原型: boll ctype_
cntrl
(string text);
ctype_digit
-- Check for numeric character(s)
检查时候是只包含数字字符的字符串(0-9)
函数原型: boll ctype_
digit
(string text);
ctype_graph
-- Check for any printable character(s) except space
检查是否是只包含有可以打印出来的字符(除了空格)的字符串
函数原型: boll ctype_
graph
(string text);
ctype_lower
-- Check for lowercase character(s)
检查是否所有的字符都是英文字母,并且都是小写的
函数原型: boll ctype_lower
(string text);
ctype_print
-- Check for printable character(s)
检查是否是只包含有可以打印出来的字符的字符串
函数原型: boll ctype_
print
(string text);
ctype_punct
-- Check for any printable character which is not whitespace or an alphanumeric character
检查是否是只包含非数字/字符/空格的可打印出来的字符
函数原型: boll ctype_
punct
(string text);
ctype_space
-- Check for whitespace character(s)
检查是否是只包含类是“ ”之类的字符和空格
函数原型: boll ctype_
space
(string text);
ctype_upper
-- Check for uppercase character(s)
检查是否所有的字符都是英文字母,并且都是大写的
函数原型: boll ctype_
upper
(string text);
ctype_xdigit
-- Check for character(s) representing a hexadecimal digit
检查是否是16进制的字符串,只能包括“0123456789abcdef”
函数原型: boll ctype_
xdigit
(string text);
可以代替preg_match的一些应用,很不错,这样简单的正则可以不用写了直接用内部函数判断
ctype_alnum
-- Check for alphanumeric character(s)
检测是否是只包含[A-Za-z0-9]
函数原型: boll ctype_alnum(string text);
ctype_alpha
-- Check for alphabetic character(s)
检测是否是只包含[A-Za-z]
函数原型: boll ctype_
alpha
(string text);
ctype_cntrl
-- Check for control character(s)
检查是否是只包含类是“
”之类的字符控制字符
函数原型: boll ctype_
cntrl
(string text);
ctype_digit
-- Check for numeric character(s)
检查时候是只包含数字字符的字符串(0-9)
函数原型: boll ctype_
digit
(string text);
ctype_graph
-- Check for any printable character(s) except space
检查是否是只包含有可以打印出来的字符(除了空格)的字符串
函数原型: boll ctype_
graph
(string text);
ctype_lower
-- Check for lowercase character(s)
检查是否所有的字符都是英文字母,并且都是小写的
函数原型: boll ctype_lower
(string text);
ctype_print
-- Check for printable character(s)
检查是否是只包含有可以打印出来的字符的字符串
函数原型: boll ctype_
(string text);
ctype_punct
-- Check for any printable character which is not whitespace or an alphanumeric character
检查是否是只包含非数字/字符/空格的可打印出来的字符
函数原型: boll ctype_
punct
(string text);
ctype_space
-- Check for whitespace character(s)
检查是否是只包含类是“ ”之类的字符和空格
函数原型: boll ctype_
space
(string text);
ctype_upper
-- Check for uppercase character(s)
检查是否所有的字符都是英文字母,并且都是大写的
函数原型: boll ctype_
upper
(string text);
ctype_xdigit
-- Check for character(s) representing a hexadecimal digit
检查是否是16进制的字符串,只能包括“0123456789abcdef”
函数原型: boll ctype_
xdigit
(string text);
可以代替preg_match的一些应用,很不错,这样简单的正则可以不用写了直接用内部函数判断
相关文章推荐
- php被遗忘的一些功能强大的字符串处理函数
- php字符串处理函数大全
- PHP字符串处理函数
- php实习的tips(常见的字符串处理函数)
- php基础 7---字符串处理函数
- 浅析51个PHP处理字符串的函数
- php中常用字符串处理函数
- 【PHP基础知识】——常用字符串处理函数总结
- 解析php字符串处理函数
- php字符串处理函数
- PHP - Manual手册 - Function Reference函数参考 - Text Processing文本处理 - Strings字符串 - String Functions字符串函数 - strip_tags字符串中去除HTML和PHP标记
- PHP - Manual手册 - CLXI. String 字符串处理函数 - str_replace用替换字符串替换所有出现的搜索字符串
- php字符串处理函数大全
- php字符串处理函数大全
- php字符串处理函数大全
- php字符串处理函数讲解
- php中的处理字符串的函数
- php字符串处理函数大全
- php字符串处理函数(下)
- 常用的php字符串处理函数