Can this code be modified to recognize apostrophes and capitalize the next letter ?
Thanks for the help.
<cfif IsDefined("FORM.UserLastName") AND #FORM.UserLastName# NEQ "">
<cfset sentence = "#FORM.UserLastName#">
<cfset sentence = UCase(Left(sentence, 1)) & LCase(Right(sentence, Len(sentence)-1))>
<cfset found_at = REFind(" [[:lower:]]", sentence)>
<cfloop condition="found_at">
<cfset string_is = Mid(sentence, found_at, 2)>
<cfset sentence = ReplaceNoCase(sentence, string_is, UCase(string_is), "ALL")>
<cfset found_at = REFind(" [[:lower:]]", sentence)>
</cfloop>
<cfset sentenceULName = sentence>
'#sentenceULName#'
<cfelse>
NULL
</cfif>

New Topic/Question
Reply



MultiQuote





|