There are a few titlecase style UDFs at cflib.org, but the simplest
solution is..
str = ucase(left(str,1)) lcase(right,len(str)-1);
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of
What DB are you using? Oracle8i has a neat function named initcap that will
do it for you. You could say:
SELECT INITCAP(LOWER(city)) as city FROM someTable...
+---+
Bryan Love
Database Analyst
Macromedia Certified Professional
Internet
You could use the LCase function. Although it will convert the text to all
lower case, I think you could use it in conjunction with the replace
function, making sure that it ignores the first letter of the string and
converting the rest.
- Original Message -
From: Earl, George [EMAIL
On Tuesday, May 27, 2003, at 11:01 US/Pacific, Raymond Camden wrote:
There are a few titlecase style UDFs at cflib.org, but the simplest
solution is..
str = ucase(left(str,1)) lcase(right,len(str)-1);
Won't work for NEW YORK (it would produce New york instead of New York).
So, cflib.org it
Message-
From: Sean A Corfield [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 12:10 PM
To: CF-Talk
Subject: Re: Leave first letter uppercase . . .
On Tuesday, May 27, 2003, at 11:01 US/Pacific, Raymond Camden wrote:
There are a few titlecase style UDFs at cflib.org
You can do something like
cfset variables.elementLength = len(State);!--- the Length of your State
Name or City Name ---
cfoutput#ucase(left(State, 1))# #lcase(right(State, variables
elementLength - 1))#/cfoutput
Ben
---Original Message---
From: [EMAIL PROTECTED]
Date: Tuesday, May
if you are using dreamweaver this extension is what i use to do that
http://www.dwteam.com/Extensions/
get the TEXT FORMAT SUITE
Dave
- Original Message -
From: Earl, George [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 1:53 PM
Subject: Leave first letter
You could also use style sheets for this
style
H1 { text-transform: capitalize }
/style
h1#lcase(city)#/h1
-Original Message-
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 1:37 PM
To: CF-Talk
Subject: Leave first letter uppercase . . .
8 matches
Mail list logo