<CFSCRIPT>
/**
* Capitalizes the first letter in each word.
*
* @param string String to be modified.
* @return Returns a string.
*/
function CapFirst(str) {
var newstr = "";
var word = "";
var i = 1;
var strlen = listlen(str," ");
for(i=1;i lte strlen;i=i+1) {
word = ListGetAt(str,i," ");
newstr = newstr & UCase(Left(word,1));
if(len(word) gt 1)
newstr = newstr & LCase(Right(word,Len(word)-1));
if(i lt strlen)
newstr = newstr & " ";
}
return newstr;
}
</CFSCRIPT>
Ray Thompson
Tau Beta Pi ( <http://www.tbp.org/> www.tbp.org)
The Engineering Honor Society
865-546-4578
_____
From: stas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 11:07 AM
To: SQL
Subject: Proper case function
Is there a function that will convert an all caps name to proper case?
Thanks
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
