aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-17 11:52:51 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-17 11:52:51 +0100
commit18e96e6c3b867da06aabd29bcd83e92ffe58a00e (patch)
tree7ac50db2fa25e0dbb1c91e0f94b9b18974efd122 /src/main/java/at/hannibal2/skyhanni/utils
parent3468dcc7df5d93157dd16d0a9b6d6ddbd736a5a0 (diff)
downloadskyhanni-18e96e6c3b867da06aabd29bcd83e92ffe58a00e.tar.gz
skyhanni-18e96e6c3b867da06aabd29bcd83e92ffe58a00e.tar.bz2
skyhanni-18e96e6c3b867da06aabd29bcd83e92ffe58a00e.zip
Created PetAPI and deprecated String.matchRegex()
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt
index b60c08b6f..05694c0a9 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/StringUtils.kt
@@ -71,6 +71,7 @@ object StringUtils {
return toString().replace("-", "")
}
+ @Deprecated("Do not create a regex pattern each time.", ReplaceWith("toPattern()"))
fun String.matchRegex(@Language("RegExp") regex: String): Boolean = regex.toRegex().matches(this)
private fun String.removeAtBeginning(text: String): String =