diff --git a/src/classes/modules/java.base/java/lang/String.java b/src/classes/modules/java.base/java/lang/String.java index c0470fcc..7423d83d 100644 --- a/src/classes/modules/java.base/java/lang/String.java +++ b/src/classes/modules/java.base/java/lang/String.java @@ -768,6 +768,24 @@ private static byte[] encodeWithEncoder(Charset cs, byte coder, byte[] val, bool return safeTrim(ba, bb.position(), cs.getClass().getClassLoader() == null); } + public String repeat(int count){ + if(count < 0){ + throw new IllegalArgumentException("count is negative : " + count); + }else if(count == 0){ + return ""; + }else { + int length = value.length; + int newLength = length * count; + final byte[] newString = new byte[newLength]; + int i = 0; + while (i