Re: RE: PHP 4.0 Bug #7360 Updated: is_a2z would be nice...

From: Date: Sun, 21 Jan 2001 13:04:08 +0000
Subject: Re: RE: PHP 4.0 Bug #7360 Updated: is_a2z would be nice...
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-44674@lists.php.net to get a copy of this message
At 13:55 21.1. 2001, Maxim Maletsky wrote the following: -------------------------------------------------------------- >Great! > >Is it documented anywhere yet? (is my name up there as well? I know I >haven't done much except bringing this issue up, but I would be on the 7-th >sky seeing my name on the PHP change-logs) > >Cheers, >Maxim Maletsky. Not yet; as a matter of fact, the ctype extension is still in experimental stage, which means that function names haven't stabilized yet etc. See ext/ctype in the source package (http://snaps.php.net/) for details. >ID: 7360 >Updated by: cynic >Reported By: maxim@maxim.cx >Old-Status: Feedback >Status: Closed >Bug Type: Feature/Change Request >Assigned To: >Comments: > >ctype functions are now implemented > >Previous Comments: >--------------------------------------------------------------------------- > >[2000-10-20 05:59:15] hholzgra@php.net >what about implementing the ctype.h family of functions available in C and >stick with their namespace ? isalnum, isalpha, isascii, isblank, >iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, >isupper, isxdigit > >--------------------------------------------------------------------------- > >[2000-10-20 02:24:38] maxim@maxim.cx >A suggestion: I was thinking that there are some functions that should >exist in PHP: 1: if(eregi("[A-Z]", $string)) this could be called something >like is_a2z (any name is OK, I just though about nl2br). Instead of using >RegEx which is real slow when you have to check strings several times in a >script a simple function like this would be of a BIG HELP. (I know of >is_numeric(), but it's use will not make you sure that the string is >esclusivelly alphabetic). A build-in function to detect whether a $string is >entirelly made from a-z avoiding so regular expression use is really needed, >I think. 2: Another thing (Less important) is that instead of using >(ereg("[:alnum:]", $string)) you could just say if(!is_almun($string)), just >to make (ereg("[:alnum:]", $string)) be a little lighter and easier for >beginners. (few beginners use [:almun:], they usually get into writing some >huge long expressions,) this would impress them a lot. Thanks for your >patience, Maxim Maletsky > >--------------------------------------------------------------------------- > > >Full Bug description available at: http://bugs.php.net/?id=7360 > > > >-- >PHP Development Mailing List <http://www.php.net/> >To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net >For additional commands, e-mail: php-dev-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net ------end of quote------ ____________________________________________________________ Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. cynic@mail.cz

« previous php.dev (#44674) next »