PHP4.04 新增加了專用的字元函數 Ctype_PHP教程

來源:互聯網
上載者:User
Character type functions
These functions check whether a character or string falls into a certain character class according to the i current locale.
這些函數根據當前現場的 i 檢查一個字元或字串是否在一個字元類裡面!

When called with an integer argument these functions behave exactly like their C counterparts.
當使用整數參數調用時,這些函數和 C 裡面的函數完全符合。

When called with a string argument they will check every character in the string and will only return true if every character in the string matches the requested criteria.
當使用字串參數,將檢查字串裡面的每一個字元,如果字串裡面的每個字元都等同於請求標準時返回 true.

Passing anything else but a string or integer will return false immediately.
傳送非字串或整數的參數將立即返回 false


Warning
警告:

These functions are new as of PHP 4.0.4 and might change their name in the near future. Suggestions are to change them to ctype_issomething() instead of ctype_somthing() or even to make them part of ext/standard and use their original C-names, although this would possibly lead to further confusion regarding the isset() vs. is_sometype() problem.

這些函數是 php4.04 新增加的。可能在近期改變。建議包括更改 ctype_issomething() 代替 ctype_somthing(),甚至讓他們成為擴充/標準的一部分,和使用他們的原始 C_名字。儘管可能導致將來 isset() 對 is_sometype() 的混亂。



http://www.bkjia.com/PHPjc/532487.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/532487.htmlTechArticleCharacter type functions These functions check whether a character or string falls into a certain character class according to the i current locale. 這些函數根據當前現場的...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.