Thanks for all the suggestions. I guess I failed to mention that I am working with Applets which means that I am only working with JDK 1.1 and awt only. However, I can always import the segment code into the project.
 
Regards.
-----Original Message-----
From: Roger Glover [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 12:19 AM
To: JDJList
Subject: [jdjlist] RE: String segmentation??? (was: RE: Slow: string += s tring)

Exactly!  And since Segment is basically a character array with "offset" and "count" values to indicate the current "text of interest", you may not need to do an array copy at all!
 
-- Roger
-----Original Message-----
From: Burnett, David [mailto:[EMAIL PROTECTED]]

Point taken - I was thinking of the last time I had to do this and I was parsing the string for HTML tags and other strange content at the time and converting the computer-friendly stuff to human-friendly stuff as I went.
It is more efficient to start at the required length and work backwards if you can depend on arraycopy (substring) to move chars for you.
 
db
-----Original Message-----
From: Roger Glover [mailto:[EMAIL PROTECTED]]

RE: "A look at the source code..."
Take another look. :^)  The method does not "iterate through" to "the required line length", it *starts* at the required line length and then iterates backward looking for whitespace.
 
-- Roger
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to