aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger/NumberUtil.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/NumberUtil.kt')
-rw-r--r--src/main/kotlin/moe/nea/ledger/NumberUtil.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/NumberUtil.kt b/src/main/kotlin/moe/nea/ledger/NumberUtil.kt
index 267a8c5..d26b047 100644
--- a/src/main/kotlin/moe/nea/ledger/NumberUtil.kt
+++ b/src/main/kotlin/moe/nea/ledger/NumberUtil.kt
@@ -27,7 +27,7 @@ fun parseShortNumber(string: String): Double {
return k.toDouble() * scalarMultiplier
}
-fun <T> Pattern.useMatcher(string: String, block: Matcher.() -> T): T? =
+inline fun <T> Pattern.useMatcher(string: String, block: Matcher.() -> T): T? =
matcher(string).takeIf { it.matches() }?.let(block)
fun String.unformattedString(): String = replace("ยง.".toRegex(), "") \ No newline at end of file