-
Notifications
You must be signed in to change notification settings - Fork 381
Open
Description
Hi,
as a follow up on #10170 (comment) I experimented a bit:
On my machine "function"/"lambda" seems to be the overall winner.
("fastPath" wins in Firefox in case of constant input strings but not in Chrome.)
So my proposal would be something like this:
public String replace(CharSequence from, CharSequence to) {
return asNativeString().replaceAll(from.toString(), () -> {
return to.toString();
});
}
Regards
Metadata
Metadata
Assignees
Labels
No labels