I beleive there is a indexOf function. You can also check the API documentation.

Qasim


On Thu, 2 Sep 2004 12:53:55 -0500, Tyson Kelley <[EMAIL PROTECTED]> wrote:
> Is there a way to search the string buffer and get the position of the
> match?
> 
> Thanks,
> Tyson 
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Roland Collins
> Sent: Thursday, September 02, 2004 10:42 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Java String Buffer
> 
> Glad to be of service :)
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Qasim Rasheed
> Sent: Thursday, September 02, 2004 11:34 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [CFCDev] Java String Buffer
> 
> Roland,
> 
> Thanks for your reply. I knew that StringBuffer has to be faster and
> there surely was some stupid mistake in my code.
> 
> Qasim
> 
> On Thu, 2 Sep 2004 11:24:33 -0400, Roland Collins <[EMAIL PROTECTED]>
> wrote:
> > Your code is wrong.  You put the header row in the loop for the
> > regular string.  So for the regular string, you had:
> >
> > <CFLOOP QUERY="data">
> >        <CFSET csvString = data.columnList & endOfLine>
> >        <CFLOOP INDEX="thisColumn" LIST="#data.columnlist#">
> >
> > This truncated the string every time, so the most you ever had in
> csvString
> > was the header and one row.  If should have been:
> >
> > <CFSET csvString = data.columnList & endOfLine> <CFLOOP QUERY="data">
> >        <CFLOOP INDEX="thisColumn" LIST="#data.columnlist#">
> >
> > If you run the attached script (which contains the correction), you
> > will
> see
> > that StringBuffer is indeed a lot faster.
> >
> > Hope that helps!
> >
> > Roland
> >
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> > Behalf Of Qasim Rasheed
> > Sent: Thursday, September 02, 2004 10:18 AM
> > To: [EMAIL PROTECTED]
> > Subject: [CFCDev] Java String Buffer
> >
> > I remember reading several blog posts about the performance
> > improvement one get if uses StringBuffer class instead of Regular
> > String. What I am trying to do is generate a csv file from a large
> > query data. But somehow the StringBuffer takes longer than regular
> > String. It is certainly possible that I am not implementing it
> > correctly. Can someone take a look at the attach file and let me know
> > what is wrong.
> >
> > Thanks
> >
> > Qasim
> >
> >
> >
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to
> [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool,
> Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at
> www.mail-archive.com/[EMAIL PROTECTED]
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to
> [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool,
> Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at
> www.mail-archive.com/[EMAIL PROTECTED]
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
>
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to