From 2ff0e5ae9883ae0e6bca5a1045fd6776b42f5fa9 Mon Sep 17 00:00:00 2001 From: AshyBoxy Date: Tue, 15 Oct 2024 17:22:51 +0100 Subject: [PATCH] string builder --- src/main/java/xyz/ashyboxy/Uwuifier.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/xyz/ashyboxy/Uwuifier.java b/src/main/java/xyz/ashyboxy/Uwuifier.java index bcaa998..166344c 100644 --- a/src/main/java/xyz/ashyboxy/Uwuifier.java +++ b/src/main/java/xyz/ashyboxy/Uwuifier.java @@ -141,14 +141,14 @@ public static String uwuifyHashed(String str) { private static String puncGen(String punc, String alt, int maxLen, int minLen, float altChance) { int count = rand.nextInt(maxLen - minLen) + minLen; - String result = ""; + StringBuilder result = new StringBuilder(); for (int i = 0; i < count; i++) { if (rand.nextFloat() < altChance) - result += alt; + result.append(alt); else - result += punc; + result.append(punc); } - return result; + return result.toString(); } private static class Punc {