Thanks, Nancy, but I was hoping for someething on the SQL side...
  ----- Original Message -----
  From: Graham Nancy (air1nxg)
  To: SQL
  Sent: Tuesday, February 03, 2004 11:10 AM
  Subject: RE: Proper case function

  I use the following script but it has a problem with names like McIntire. It
  does not account for a second cap. If anyone has a fix for this let me know.
  <cfscript>

  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>

  Nancy

  -----Original Message-----
  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]

Reply via email to