Sorry, misread it. Thought you were looping over list elements. Should have looked closer.
<stands in corner> But yes, interesting about the speed thing. Listqualify does however allow you to specify whether to qualify CHARs only. > -----Original Message----- > From: Paul Johnston [mailto:[EMAIL PROTECTED] > Sent: 01 July 2003 15:17 > To: [EMAIL PROTECTED] > Subject: RE: [ cf-dev ] stuipid list question > > > > Heh! Either completely missing the point or taking the piss > > You wacky funster you! ;-) > > Put the code into a page and run it as is... Then you'll see > I'm not taking > the piss and haven't missed the point. > > Paul > > > > -----Original Message----- > > > From: Paul Johnston [mailto:[EMAIL PROTECTED] > > > Sent: 01 July 2003 13:49 > > > To: [EMAIL PROTECTED] > > > Subject: RE: [ cf-dev ] stuipid list question > > > > > > > > > Interesting you say listqualify() and you are correct, but... > > > > > > To do what you want, it may be quicker to do it like this: > > > > > > <cfset list = ""> > > > <cfloop from="1" to="20" index="i"> > > > <cfset list = listappend(list, randrange(1,1000))> > > > </cfloop> > > > <cfoutput>#list#</cfoutput> > > > > > > <cfset numOfIterations = "10000"> > > > > > > <cfset a = gettickcount()> > > > <cfloop from="1" to="#numOfIterations#" index="i"> > > > <cfset list2 = listqualify(list, "'", ",")> > > > </cfloop> > > > <cfset b = gettickcount()> > > > <cfset c = b - a> > > > <cfoutput>#list2# (#c#)</cfoutput> > > > > > > <cfset a = gettickcount()> > > > <cfloop from="1" to="#numOfIterations#" index="i"> > > > <cfset list3 = "'" & replace(list, ",", "','", "all") & > > "'"> </cfloop> > > > <cfset b = gettickcount()> > > > <cfset d = b - a> > > > <cfoutput>#list3# (#d#)</cfoutput> > > > > > > <cfset percentage = (d/c) * 100> > > > <cfoutput>#DecimalFormat(percentage)#%</cfoutput> > > > > > > I've just done some testing, and the second option seems to > > > take about 75% > > > of the time of the listqualify(). > > > > > > :D > > > > > > HTH > > > > > > Paul > > > > > > > -----Original Message----- > > > > From: Taz [mailto:[EMAIL PROTECTED] > > > > Sent: 01 July 2003 13:41 > > > > To: [EMAIL PROTECTED] > > > > Subject: Re: [ cf-dev ] stuipid list question > > > > > > > > > > > > ListQualify() > > > > > > > > Taz > > > > > > > > > > > > > > Whats the best to change a list into a quoted list > > > > > > > > > > e.g. a,b -> 'a','b' > > > > > > > > > > I'm sure there is a quick way to do this without cfloop.... > > > > > > > > > > Thanks @j > > > > > > > > > > -- > > > > > ** Archive: > > > > http://www.mail-archive.com/dev%> 40lists.cfdeveloper.co.uk/ > > > > > > > > > > > > > > To unsubscribe, e-mail: > > > > [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > > > > [EMAIL PROTECTED] For > > > > > human help, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > -- > > > > ** Archive: > > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] For human help, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > -- > > ** Archive: > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > -- > > ** Archive: > http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > For human help, e-mail: [EMAIL PROTECTED] > > > > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] > > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
