From 7104edb59288ba24195458d9b258adb56f260549 Mon Sep 17 00:00:00 2001 From: Jasper Siepkes Date: Tue, 6 Jun 2023 10:09:25 +0200 Subject: [PATCH] classlib: add stripLeading and stripTrailing methods to String class (#707) The stripLeading and stripTrailing methods were added in Java 11 to the String class. Based on the implementation of the existing strip method in TeaVM this commit adds the stripLeading() and stripTrailing() methods (and tests) to the String class in the class library. --- .../org/teavm/classlib/java/lang/TString.java | 16 +++++++++++++++ .../teavm/classlib/java/lang/StringTest.java | 20 +++++++++++++++++++ 2 files changed, 36 insertions(+) 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 de4cc9d69..be541ea68 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 @@ -487,6 +487,22 @@ public class TString extends TObject implements TSerializable, TComparable