diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/RegexUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/RegexUtils.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RegexUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RegexUtils.kt index 927b08d54..57c6c69e5 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/RegexUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/RegexUtils.kt @@ -56,4 +56,10 @@ object RegexUtils { } return null } + + fun Iterable<Pattern>.matches(string: String?): Boolean { + if (string == null) return false + return this.any { it.matches(string) } + } + } |