aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger/NumberUtil.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-04-02 16:01:38 +0200
committerLinnea Gräf <nea@nea.moe>2024-04-02 16:01:38 +0200
commit3e0198e3a803d2dd46988ba0ac445412c7da8390 (patch)
tree6f08cebe11894769ead7ce7473b27dbdf21523d5 /src/main/kotlin/moe/nea/ledger/NumberUtil.kt
parent8d26a206297071775e88b99d4b38efcc5577af0a (diff)
downloadmoney-ledger-3e0198e3a803d2dd46988ba0ac445412c7da8390.tar.gz
money-ledger-3e0198e3a803d2dd46988ba0ac445412c7da8390.tar.bz2
money-ledger-3e0198e3a803d2dd46988ba0ac445412c7da8390.zip
Add bits stuff
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