I tried it and it did not skip the white space.  However, if you already
have space or line breaks while displaying, it will only show ONE space.  So
you get I a m a s t r i n g which looks like it is skipping spaces but
really is just displaying one space after EVERY character.

-Craig

----- Original Message -----
From: "Kevin Gilchrist" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 3:26 PM
Subject: RE: Looping through text string


> I just tried some similar code as well when I saw that it skips white
> space in the string.
>
> -----Original Message-----
> From: Craig [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 19, 2001 16:21
> To: CF-Talk
> Subject: Re: Looping through text string
>
>
> something like:
>
> <cfset mystring = "I am a string">
>
> <cfset stringlength = len(mystring)>
>
> <cfloop from="1" to="#stringlength#" index="i">
>     <cfset currentletter = mid(mystring, i, 1)>
>     <cfoutput>#currentletter# </cfoutput>
> </cfloop>
>
>
> ----- Original Message -----
> From: "raphael" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, November 19, 2001 2:56 PM
> Subject: Looping through text string
>
>
> > Anyone know how to loop through a text string to get the letter?
> >
> >
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to