EOSERV Bug Tracker > Bug #150: util::ucfirst does not capitalize 'a' or 'z'

Bug #150: util::ucfirst does not capitalize 'a' or 'z'

util::ucfirst does not capitalize 'a' or 'z'
ID #150
Submitter Ryouken
Product EOSERV
Severity Normal
Status CLOSED, FIXED
Submitted 8th Oct 2012
Updated 8th Oct 2012
Related SVN Revisions
Rev# Date Description
r359 08 Oct 2012 02:55:01 UTC Fix util::ucfirst not capitalizing words starting with 'a' or 'z' (bug #150), Make all util f ...
Ryouken Submitter 12 years, 8 weeks ago

util::uppercase does not make 'a' capital. It works on all other letters as far as I know, just not the letter 'a'.

Comments

Sausage Developer 12 years, 8 weeks ago

It's ucfirst that has the problem, and I thought that was fixed a few years ago...

It's the letters 'a' and 'z', by the way.

Updated Status to CONFIRMED

Ryouken Submitter 12 years, 8 weeks ago

Yea, i just noticed I was talking about ucfirst, my bad. ;o

Ryouken Submitter 12 years, 8 weeks ago

Oh, also. sorry about double posting, but would this work?

if (subject[0] >= 'a' && subject[0] <= 'z')

{

subject[0] += 'A' - 'a';

}

Sausage Developer 12 years, 8 weeks ago

Yep, that'd do it. A few other problems in the general area to fix as well...

Apollo 12 years, 8 weeks ago

The fix you remember was telling me for the case of first letter caps which is only officially used by weddings. May as well fix that as well if it is seperate.

Sausage Developer 12 years, 8 weeks ago

No, the fix I remember was fixing it years ago, and loads of things use ucfirst.

Sausage Developer 12 years, 8 weeks ago

Fixed in r359

Updated Status to CLOSED, FIXED

Add Comment

Please don't post unless you have something relevant to the bug to say.
Do not comment to say "thanks" or "fix this please".

Please log in to add comments. EOSERV Bug Tracker > Bug #150: util::ucfirst does not capitalize 'a' or 'z'