diff options
author | Linnea Gräf <nea@nea.moe> | 2024-04-02 16:01:38 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-04-02 16:01:38 +0200 |
commit | 3e0198e3a803d2dd46988ba0ac445412c7da8390 (patch) | |
tree | 6f08cebe11894769ead7ce7473b27dbdf21523d5 /src/main/kotlin/moe/nea/ledger/NumberUtil.kt | |
parent | 8d26a206297071775e88b99d4b38efcc5577af0a (diff) | |
download | money-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.kt | 2 |
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 |