#21626 [Opn->Bgs]: ucwords() fails to capitalize words in parenthesis
| From: | iliaa@php.net | Date: | Tue, 14 Jan 2003 01:16:14 +0000 |
| Subject: | #21626 [Opn->Bgs]: ucwords() fails to capitalize words in parenthesis | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-29959@lists.php.net to get a copy of this message | ||
ID: 21626
Updated by: iliaa@php.net
Reported By: ieure@debian.org
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: Debian GNU/Linux 3.0 (Woody)
PHP Version: 4.2.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2003-01-13 19:06:35] ieure@debian.org
When using ucwords() on a string which contains words in
parenthesis, the first word in the parenthesis is not
capitalized.
Here's a quick example, pasted from an xterm.
-- snip --
ieure!Phaktory:~$ cat ucwords.php
#!/usr/bin/php4 -q
<?php
echo ucwords($_SERVER['argv'][1])."\n";
?>
ieure!Phaktory:~$ ./ucwords.php 'test'
Test
ieure!Phaktory:~$ ./ucwords.php 'test test'
Test Test
ieure!Phaktory:~$ ./ucwords.php 'test test (test)'
Test Test (test)
ieure!Phaktory:~$ ./ucwords.php 'test test (test test)'
Test Test (test Test)
ieure!Phaktory:~$ ./ucwords.php 'test test ( test test)'
Test Test ( Test Test)
ieure!Phaktory:~$
-- snip --
As you can see, ucwords() won't capitalize the first 'test'
when there is no whitespace between the open-parenthesis
and the first letter.
Affects both CGI and Apache module versions. Here's the
script I used to test the apache module:
<?php
echo ucwords($_GET['string']);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21626&edit=1