I have 2 variables, FirstName and LastName. These are always returned in CAPS. Sometimes the Firstname has a space and then a middle inital. So, the firstname might be something like BOB R.
On cfoutput I want to convert that to Bob R. Can someone assist? Basically, if there is a space and then another letter in the string I want the letter after the space to be uppercase as well.
Thank you.
<cfloop index="word" list="#theName#" delimiters=" ">
<cfif len(word) gt 1>
#ucase(left(word,1))##lcas
<cfelse>
#ucase(word)#
</cfif>
</cfloop>