php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42590 ucwords doesn't work correctly, when a word is preceded by verticaltab/formfeed
Submitted: 2007-09-07 16:10 UTC Modified: 2007-09-09 16:34 UTC
From: kraghuba at in dot ibm dot com Assigned:
Status: Closed Package: Strings related
PHP Version: 5CVS-2007-09-07 (snap) OS: linux, windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kraghuba at in dot ibm dot com
New email:
PHP Version: OS:

 

 [2007-09-07 16:10 UTC] kraghuba at in dot ibm dot com
Description:
------------
ucwords() fails to change the first char of a word to uppercase when word is preceded by vertical tab(\v) or formfeed(\f). As per the documentation at http://in.php.net/manual/en/function.ucwords.php it should change the first char to uppercase. 

This is applicable to php5 as well as php6

Reproduce code:
---------------
<?php
  $str = "testing \vucw\ford \vfunc\vtion";
  var_dump( ucwords($str) );
?>

Expected result:
----------------
char preceded with \v and \f should be changed to uppercase.

Actual result:
--------------
string(31) "Testing \vucw\ford \vfunc\vtion"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-09 16:34 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 11:01:29 2024 UTC