<cfset myString="This is a Cold Fusion Article">
<cfset initials="">

<cfloop from="1" to="#listlen(myString, " ")#" index="word">
        <cfset initials=initials & left(listgetat(myString, word, " "),
1)>
</cfloop>

<cfoutput>#initials#</cfoutput>

HTH

Ryan Edgar


-----Original Message-----
From: Edward McDermott [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2002 16:22
To: CF-Talk
Subject: String Magic: Extract initial character of words in a string


I want to be able to take a string, for example a journal article title,
and
parse out just the initial characters of each word.  For example: "This
is a
Cold Fusion Article" becomes "TIACFA".  Thanks in advance.

Ed

Edward J. McDermott
Systems Librarian
Robert H. Goddard Library
Clark University
950 Main Street
Worcester, MA 01610
(508) 793-7651
(508) 793-8871 [FAX]
[EMAIL PROTECTED]


______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to