From: Jeremy Cowgar <jeremy@cowgar.com>
What is the quickest/best way to build a string? For instance:
myString = "John Doe"
myString = myString + " had "
myString = myString + " a "
myString = myString + " dog. "
is probably not the best way. Is there a class out there that deals
with
a buffer and expands the buffer when necessary?
The FastString class in my plugin.
fs = new FastString
fs.AppendData "John Doe"
fs.AppendData " had "
fs.AppendData " a "
fs.AppendData " dog. "
mystring = fs
FastString has so many tricks to make things faster... For example you
can set the size exactly if you want, or if not i assumes the size
doubles if it runs out of buffer space. Or it can even write to a file
when it runs out of internal buffer space, so there's no need to
resize the buffer at all.
it's also got so many utility functions to make things faster.
Like .AppendIntegerAsText...
--
http://elfdata.com/plugin/
"String processing, done right"
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|