Character Type functions

Character Type functions

bool ctype_alnum(string txt)

checks whether all the character in the string supplied are alpah numeric characters which is similar to regular match preg_match(’/^[a-z0-9]+$/iD’, txt)

bool ctype_alpha ( string text )

checks whether all the character in the string supplied are alphabet
characters which is similar to regular match preg_match(’/^[a-zA-Z]/’, txt)

bool ctype_cntrl ( string text )

checks whether all the character in the string supplied are control
characters. Control characters are e.g. line feed, tab, escape.
ie are ‘\n\r\t’

bool ctype_digit ( string text )

checks whether all the character in the string supplied are numerical
characters which is similar to regular match preg_match(’/^[0-9]/’, txt)

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.