diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-21 11:58:39 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-21 11:58:39 +0100 |
| commit | 7dc53e46d9816799d713a52015a986291c24f84b (patch) | |
| tree | 5fd527ac2533172900560e73605635a60de3976c /src/main/java/at/hannibal2/skyhanni/utils | |
| parent | cdff2f52c54f05c96b9ca62a536392dd51e49e3f (diff) | |
| download | skyhanni-7dc53e46d9816799d713a52015a986291c24f84b.tar.gz skyhanni-7dc53e46d9816799d713a52015a986291c24f84b.tar.bz2 skyhanni-7dc53e46d9816799d713a52015a986291c24f84b.zip | |
Fixed roman numbers check
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt index d8e619d78..6da701b78 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt @@ -85,6 +85,8 @@ object NumberUtil { } } + fun String.romanToDecimalIfNeeded() = toIntOrNull() ?: romanToDecimal() + /** * This code was converted to Kotlin and taken under CC BY-SA 3.0 license * @link https://stackoverflow.com/a/9073310 |
