On Jan 15, 2007, at 22:20, Andreas L Delmelle wrote:
Not really sure what would be most efficient:
- a void method appending to a parameter StringBuffer
- a method returning a copy of the char from index to index...
Seen that every String ultimately has a backing char(*) anyway,
I'd say that we can safely return the copy, and remove the overhead of
Looked a bit deeper, and there is apparently a good reason to use a
StringBuffer: the char from one FOText might need to be appended to
that of a previous one (see TextLM.findHyphenationPoints()).
I guess it would be a bad idea to replace this with arrays, since
they're not so straightforward to concatenate (requires copying into
a new array).
Too bad we're still targeting 1.3, else we might consider switching
to a java.nio.CharBuffer...