From 6aee7a9a34630a0bfcdb3857991db5fcf085e8a4 Mon Sep 17 00:00:00 2001 From: zealerker22 <97942218+zealerker22@users.noreply.github.com> Date: Sat, 6 Jul 2024 21:46:52 -0400 Subject: [PATCH] use first() instead of index operator (per suggestion) --- .../gg/skytils/skytilsmod/features/impl/misc/ItemFeatures.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/misc/ItemFeatures.kt b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/misc/ItemFeatures.kt index f8c857e3a..e9c868534 100644 --- a/src/main/kotlin/gg/skytils/skytilsmod/features/impl/misc/ItemFeatures.kt +++ b/src/main/kotlin/gg/skytils/skytilsmod/features/impl/misc/ItemFeatures.kt @@ -603,7 +603,7 @@ object ItemFeatures { val parts = enchant.loreName.split(" ") val joined = if (parts.size > 1) parts.joinToString("") { it[0].uppercase() } else if (parts[0].startsWith("Turbo-")) "${ - parts[0].split("-")[1].take(3).toTitleCase() + parts[0].split("-").first().take(3).toTitleCase() }." else "${ parts[0].take(3).toTitleCase()