The \2 is a left over from the first one I did... its not needed in this
shorter one (which makes it even shorter).

<cfset str = rereplace(lcase(str), '([a-z]+)', '\u\1', "all") />


.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com



-----Original Message-----
From: Bobby Hartsfield [mailto:bo...@acoderslife.com] 
Sent: Saturday, July 02, 2011 11:22 AM
To: cf-talk
Subject: RE: Capitalize


<cfset str = rereplace(lcase(str), '([a-z]+)', '\u\1\2', "all") />


.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com



-----Original Message-----
From: Bobby Hartsfield [mailto:bo...@acoderslife.com] 
Sent: Saturday, July 02, 2011 10:58 AM
To: cf-talk
Subject: RE: Capitalize


Actually, that is title case.

.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com


-----Original Message-----
From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk] 
Sent: Saturday, July 02, 2011 9:09 AM
To: cf-talk
Subject: RE: Capitalize


Capitalized is a leading cap, like: "This Is Capitalized".


>>-----Original Message-----
>>From: John M Bliss [mailto:bliss.j...@gmail.com]
>>Sent: 02 July 2011 13:49
>>To: cf-talk
>>Subject: Re: Capitalize
>>
>>
>>
>>Isn't uppercase text already capitalized?
>>
>>On Sat, Jul 2, 2011 at 7:39 AM, Jenny Gavin-Wear <
>>jenn...@fasttrackonline.co.uk> wrote:
>>
>>>
>>> I'm looking for a udf to capitalize uppercase text.  There seem
>>to be a few
>>> that does the same as a CSS text-transform, but I can't find
>>one for text
>>> which is all in upper case.
>>>
>>> Jenny
>>>
>>>
>>>
>>>
>>
>>







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346062
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to