Hrmm. For some reason I don't think my post was accepted by the cf-talk
list daemon.
If you could also post this on the list if it's not already there, thanks
Jeff
-----Original Message-----
From: Jeff Bevill [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 26, 2000 7:50 AM
To: [EMAIL PROTECTED]
Subject: RE: Capitalize First Letter of Each Word
John McKown,
Here ya go man. I only had about 10 mins to write this, hope it works. :)
<!--- l33t w3rd fixer v1.0 --->
<!--- Jeff Bevill - [EMAIL PROTECTED] --->
<cfset Variable="UnBeLiEvAbLe">
<cfif isDefined("Variable") and Len(Variable) GT 0>
<cfset in="1">
<cfset out="0">
<cfset word_state=out>
<cfset NewStr="">
<cfset is_space=false>
<cfloop index=i from=1 to=#Len(Variable)#>
<cfset Character=Mid(Variable, i, 1)>
<cfif Character is " ">
<cfset word_state=out>
<cfset NewStr=NewStr & Character>
<cfelseif Asc(Character) GE Asc("a") and Asc(Character) LE Asc("z") and
word_state EQ out>
<cfset word_state=in>
<cfset NewStr=NewStr & UCase(Character)>
<cfelseif Asc(Character) GE Asc("A") and Asc(Character) LE Asc("Z") and
word_state EQ in>
<cfset NewStr=NewStr & LCase(Character)>
<cfelse>
<cfset word_state=in>
<cfset NewStr=NewStr & Character>
</cfif>
</cfloop>
<cfset Variable=NewStr>
<cfoutput>[#Variable#] - [#NewStr#]</cfoutput>
</cfif>
Jeff Bevill
-----Original Message-----
From: John McKown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 26, 2000 6:35 AM
To: CF-Talk
Subject: Capitalize First Letter of Each Word
Can someone share a script that will capitalize the
first letter of every word entered into a form field?
John McKown, VP Business Services
Delaware.Net, Inc.
30 Old Rudnick Lane, Suite 200 Dover, DE 19901
email: [EMAIL PROTECTED]
phone: 302-736-5515
fax: 302-736-5945
icq: 1495432
----------------------------------------------------------------------------
--------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]