Treat the string as a list with spaces as the delimiter...

<CFSET charlist = "">
<CFLOOP list = "#mystring#" index="z" delimiters=" ">
<CFSET charlist = charlist + left(z, "1")>
</CFLOOP>

<CFOUTPUT>#charlist#</CFOUTPUT>

Jeff Garza
Lead Developer/Webmaster
Spectrum Astro, Inc.
[EMAIL PROTECTED]
http://www.spectrumastro.com


-----Original Message-----
From: Edward McDermott [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 9:22 AM
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]


______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
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