DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27901>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27901

TextCharIterator.remove() does not work properly





------- Additional Comments From [EMAIL PROTECTED]  2004-03-26 11:42 -------
OK,
seems I'm too late. :-)
Anyway, yet another quite fast and simple approach. No extra objects -- only one
arraycopy.

Although not really a patch I tried to make it as copy & paste friendly as possible.

Every nextChar call only shifts one char to the left. This method has one little
drawback): You have to ensure that the whole array was processed once
completely, which is the normal case. If not (e.g. if there is a break statement
in the while-loop) the array contains corrupted data, a bug which would be hard
to find. Therefore I think the ca array should be encapsulated in the FOText
class -- what involves some refactoring (the same issue applies to the current
approach). The getText method ensures that the array is processed once.

Hope this is useful
Christian Z.

Reply via email to