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]

Reply via email to