Home » U++ Library support » U++ Core » InitCaps() proposal
InitCaps() proposal [message #31899] |
Tue, 05 April 2011 09:44 |
|
koldo
Messages: 3357 Registered: August 2008
|
Senior Veteran |
|
|
Hello Mirek
Now InitCaps() function converts the first letter after a space to upper, and converts the rest to lower.
However there are problems if there are punctuation marks.
For example InitCaps("Lennon ,John") = "Lennon ,john"
This could be solved changing
with
Best regards
Iñaki
|
|
|
|
|
|
|
|
|
|
Re: InitCaps() proposal [message #31922 is a reply to message #31920] |
Thu, 07 April 2011 10:56 |
|
koldo
Messages: 3357 Registered: August 2008
|
Senior Veteran |
|
|
mirek wrote on Thu, 07 April 2011 10:21 |
koldo wrote on Wed, 06 April 2011 12:39 |
mirek wrote on Wed, 06 April 2011 17:41 |
koldo wrote on Tue, 05 April 2011 05:26 |
mr_ped wrote on Tue, 05 April 2011 09:52 | wouldn't it convert also string like "3rd" to "3Rd"?
|
Right. Change !IsLetter(c) with !IsLeNum(c).
|
You mean !IsLetter(c) && !IsDigit(c), right? (Not the same as IsAlNum).
|
Oh yes. I said IsLeNum()
|
Ops, sry, thought it is just typo. Did not even knew we have that
Anyway, patch applied.
|
Best regards
Iñaki
|
|
|
Goto Forum:
Current Time: Thu Apr 25 21:11:43 CEST 2024
Total time taken to generate the page: 0.06365 seconds
|