PHP 4.0 Bug #8326 Updated: ucfirst() has no effect if input is ALL CAPITALIZED

From: Date: Wed, 20 Dec 2000 03:09:01 +0000
Subject: PHP 4.0 Bug #8326 Updated: ucfirst() has no effect if input is ALL CAPITALIZED
Groups: php.dev 
Request: Send a blank email to php-dev+get-41889@lists.php.net to get a copy of this message
ID: 8326 Updated by: ronabop Reported By: vitaliyf@gameaholic.com Status: Open Old-Bug Type: Strings related Bug Type: Feature/Change Request Assigned To: Comments: Changed to a feature request. The first letters are put into upper case, as per the function name and description.... an alternate function such as "title case" could be interesting, but ucfirst(strtolower($string)); will also accomplish this. Previous Comments: --------------------------------------------------------------------------- [2000-12-19 21:07:33] vitaliyf@gameaholic.com A little correction: Above bug report refers to ucwords(), however ucfirst() has exact same problem. ucfirst("HELLO WORLD") should return "Hello world". --------------------------------------------------------------------------- [2000-12-19 20:55:02] vitaliyf@gameaholic.com Running ucfirst() on a string which is already all capitalized has no effect: <?php print ucfirst("HELLO WORLD"); ?> will print "HELLO WORLD". The expected behavior here is probably to return "Hello World". --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8326

« previous php.dev (#41889) next »