You could do something like this. I did not test it though: <cfset lstCountry =countryFromDB><!--- keeps the names in capital letters ---> <cfset replaceCountry =lstCountry><!--- here the names will be replaced ---> <cfloop list="#lstCountry#" index="lst" delimeters=". /("> <!--- Place all separators in the delimeters ---> <cfset sReplaceString = UCase(Left(lst, 1)) & LCase(Mid(lst, 2, Len(lst))> <!--- now take the capitalized name and replace the one in the replacestring ---> <cfset replaceCountry = Replace(replaceCountry, lst, sReplaceString, "ONCE")> </cfloop>
Greetings / GrĂ¼sse Gert Franz Customer Care Railo Technologies GmbH [EMAIL PROTECTED] www.railo.ch Join our Mailing List / Treten Sie unserer Mailingliste bei: deutsch: http://de.groups.yahoo.com/group/railo/ english: http://groups.yahoo.com/group/railo_talk/ RichL schrieb: > Hi Guys > > I have a country reference table where all of the country names are > held in upper case. > > I want to be able to output in lower case but keep the caps where > appropriate (e.g. UNITED KINGDOM to United Kingdom). > > However I think that this going to be close to impossible as there are > values such as: > > VIRGIN ISLANDS (BRITISH) > VIRGIN ISLANDS (U.S.) > WALLIS AND FUTANA > > So using a function to capitalise the first letter of each word won't > really work. > > How have people approached this situation and has anybody found any > good solution? > > Also, is there a UDF around for capitalising the first letter of each word? > > Thanks in advance > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:261376 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4