Hi everyone!

Here's another webrev, in which replace() is implemented with StringBuilder.
On my benchmark it is almost as fast as the version backed with arrays, but this variant is much shorter.

Credits to Sherman for combining the general algorithm with the case of empty target.

Comments, further suggestions are welcome!

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8058779
WEBREV: http://cr.openjdk.java.net/~igerasim/8058779/04/webrev/

Sincerely yours,
Ivan

Reply via email to