aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/utils/Utils.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-08-18 18:56:52 -0400
committerbowser0000 <bowser0000@gmail.com>2020-08-18 18:56:52 -0400
commit67cb5cc2b84743a936aeb8aa3b9e875b2e24a5ea (patch)
tree0b10dec7d9598e08c1ec2e57fd44491d45b96593 /src/main/java/me/Danker/utils/Utils.java
parent976e2efc4991202cf0d2dc86eb0d38a22be4de48 (diff)
downloadSkyblockMod-67cb5cc2b84743a936aeb8aa3b9e875b2e24a5ea.tar.gz
SkyblockMod-67cb5cc2b84743a936aeb8aa3b9e875b2e24a5ea.tar.bz2
SkyblockMod-67cb5cc2b84743a936aeb8aa3b9e875b2e24a5ea.zip
Fix capitalization of pets
Also move capitalization into Utils
Diffstat (limited to 'src/main/java/me/Danker/utils/Utils.java')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index 5dc30c6..835e613 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -103,4 +103,14 @@ public class Utils {
inSkyblock = false;
}
+ public static String capitalizeString(String string) {
+ String[] words = string.split("_");
+
+ for (int i = 0; i < words.length; i++) {
+ words[i] = words[i].substring(0, 1).toUpperCase() + words[i].substring(1).toLowerCase();
+ }
+
+ return String.join(" ", words);
+ }
+
}