日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

ctype函数_PHP Ctype(字符类型)函数

發布時間:2023/12/1 php 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ctype函数_PHP Ctype(字符类型)函数 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

ctype函數

Ctype功能 (Ctype functions)

PHP provides some of the built-in functions, which are used to verify the characters in the string i.e. to check whether a string contains the characters of specific types.

PHP提供了一些內置函數,這些函數用于驗證字符串中的字符,即檢查字符串是否包含特定類型的字符。

PHP中的Ctype函數列表 (List of the Ctype functions in PHP)

Here, is the list of the PHP Ctype functions...

這是PHP Ctype函數的列表...

ctype_alnum() - Checks whether given string contains all alphabets or numbers.

ctype_alnum() -檢查給定的字符串是否包含所有字母或數字。

ctype_alpha() - Checks whether given string contains all alphabets.

ctype_alpha() -檢查給定的字符串是否包含所有字母。

ctype_digit() - Checks whether given string contains all digits.

ctype_digit() -檢查給定的字符串是否包含所有數字。

ctype_space() - Checks whether given string contains spaces (whitespaces, tab, new line etc).

ctype_space() -檢查給定的字符串是否包含空格(空格,制表符,換行等)。

ctype_lower() - Checks whether given string contains all lowercase characters.

ctype_lower() -檢查給定的字符串是否包含所有小寫字符。

ctype_upper() - Checks whether given string contains all uppercase characters.

ctype_upper() -檢查給定的字符串是否包含所有大寫字符。

ctype_punct() - Checks whether given string contains all punctuation characters.

ctype_punct() -檢查給定的字符串是否包含所有標點符號。

ctype_xdigit() - Checks whether given string contains all hexadecimal digits.

ctype_xdigit() -檢查給定的字符串是否包含所有十六進制數字。

ctype_print() - Checks whether given string contains all printable characters.

ctype_print() -檢查給定的字符串是否包含所有可打印字符。

ctype_graph() - Checks whether given string contains all printable characters expect space.

ctype_graph() -檢查給定的字符串是否包含所有可打印字符的期望空間。

ctype_cntrl() - Checks whether given string contains all control characters.

ctype_cntrl() -檢查給定的字符串是否包含所有控制字符。

PHP Ctype函數示例 (PHP Ctype functions Example)

<?phpecho (ctype_alnum("Hello123")."\n");echo (ctype_alpha("Helloworld")."\n");echo (ctype_digit("01234")."\n");echo (ctype_space("\r\n \t")."\n");echo (ctype_lower("helloworld")."\n");echo (ctype_upper("HELLOWORLD")."\n");echo (ctype_punct("[email?protected]#~*&(){}")."\n");echo (ctype_xdigit("aaff01290")."\n");echo (ctype_print("Hello world!")."\n");echo (ctype_graph("[email?protected]#")."\n");echo (ctype_cntrl("\x00\x1F\x7F\r\n")."\n"); ?>

Output

輸出量

1 1 1 1 1 1 1 1 1 1 1

翻譯自: https://www.includehelp.com/php/ctype-character-type-functions.aspx

ctype函數

總結

以上是生活随笔為你收集整理的ctype函数_PHP Ctype(字符类型)函数的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。