From 13a959ce67c2aa4234002af34dae83a911829ecc Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 18 Jul 2024 18:51:42 +0200 Subject: [PATCH] classlib: fix String.replace, add optimizations for some corner cases Fix #932 --- .../org/teavm/classlib/java/lang/TString.java | 41 +++++++++++++------ .../teavm/classlib/java/lang/StringTest.java | 3 ++ 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/TString.java b/classlib/src/main/java/org/teavm/classlib/java/lang/TString.java index 6488165fb..fa0ca07ff 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/TString.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/TString.java @@ -501,22 +501,37 @@ public class TString extends TObject implements TSerializable, TComparable