c++|函数
在C/C++中,头文件ctype.h中定义了关于字符类型一组宏,可以得到给定字符的类型。
而PHP中没有相关函数。前些天发现在www.mm4.de下载的PHP中提供了一个名为php_ctype.dll的扩展库,
加载后发现提供一部分此类的函数,特整理出来供大家参考。
在PHP中正确加载php_ctype.dll文件后,用可以看到以下信息:
ctype
ctype functions enabled (experimental)
然后就可以使用它所提供的函数了。所有函数的用法同C/C++基本相同,区别在于在C/C++中函数的参数是
字符型(char),而在PHP中函数的参数可以是字符串(string)。例如:
$string="123ADAADAD";
if(isalnum($string))
{
echo "只有大小写字母和数字!";
}
?>
附:php_ctype.dll支持的函数
bool isalnum(string)
bool isalpha(string)
bool iscntrl(string)
bool isdigit(string)
bool isgraph(string)
bool islower(string)
bool isprint(string)
bool ispunct(string)
bool isspace(string)
bool isupper(string)
bool isxdigit(string)

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
