Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Kiriran #1
loop through a string
hello
i wonder if its possible to loop through a string. i need to do it because i
have to convert every single character so unicode after submiting the form.
or do i need to create a list?
thanks
k
Kiriran Guest
-
Loop option set, but flash doesn't loop
I'm loading some swf files on my website and they all use the same code. They include the loop=true command but some loop and some don't. Does... -
Can a film loop play once, then loop on the last frame(s)?
I need a film loop to play once, then loop playback on the last frame so I can keep the LOOP of the film loop set. This will allow the tell commands... -
Film loop rollovers working with tell sprite, but only if Loop is checked
on mouseWithin me cursor 280 tell sprite 40 --the sprite containing the film loop sprite(60).member = member("networkmapsbuttonroll") --swapping... -
Urgent: Repeat loop and Film loop clash!
Hi All, Scenario I have a script running in which the spelling which was typed in by the student is corrected. The alphabets are moved to... -
Help with loop inside loop and mysql queries
Hi List. I cannot see my error: I have relation tables setup. main id entity_name main_type etc etc date_in 1 test type1 x y 2003-06-02... -
shawnwindler #2
Re: loop through a string
Sure.
Loop on the length of the string. Use Mid(string, start, count) to get your character. Update start. Use count = 1.
I think that oughta do it.
-Shawn
shawnwindler Guest
-
Kronin555 #3
Re: loop through a string
To expand on what shawn said:
<cfset myString = "Hello World!">
<cfloop index="idx" from="1" to="#len(myString)#">
<cfset character = mid(myString,idx,1)>
<cfoutput>#character#</cfoutput>
</cfloop>
Kronin555 Guest
-
DaveF67 #4
Re: loop through a string
This should also work...
<CFSCRIPT>
myString = "Hello World!,foo,bar,MEOW";
FOR (i=1; i LTE ListLen(myString, ","); i=i+1) {
writeOutput(ListGetAt(myString,i,",") & "<BR>");
}
</CFSCRIPT>
DaveF67 Guest



Reply With Quote

