From 3e0198e3a803d2dd46988ba0ac445412c7da8390 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 2 Apr 2024 16:01:38 +0200 Subject: Add bits stuff --- src/main/kotlin/moe/nea/ledger/NumberUtil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/kotlin/moe/nea/ledger/NumberUtil.kt') 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 Pattern.useMatcher(string: String, block: Matcher.() -> T): T? = +inline fun 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 -- cgit