Treat the string as a list delimited by spaces: <cfset tmpStr = listFirst(myStr) /> <cfset myStr = listDeleteAt(myStr, 1) /> <cfloop list="#myStr#" index="i"> <cfset tmpStr = tmpStr & ucase(left(i, 1)) /> </cfloop>
-Nic Nate Willard wrote: > Tricky String, Taking a string of 2 word say "FNAME > LNAME" and returning FNAME L > > Basically I'm investigating a efficient way to take a > string of x words, likely 2 or 3. Display the first > word, the person's first name and then just the First > character of the last word. > > Example 2: > James A Bond, would end up as James A B > > Any ideas on how to efficiently do this? > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296800 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4