Bulk commit
This commit is contained in:
4
src/main/kotlin/moe/nea/firmament/util/regex.kt
Normal file
4
src/main/kotlin/moe/nea/firmament/util/regex.kt
Normal file
@@ -0,0 +1,4 @@
|
||||
package moe.nea.firmament.util
|
||||
|
||||
inline fun <T> String.ifMatches(regex: Regex, block: (MatchResult) -> T): T? =
|
||||
regex.matchEntire(this)?.let(block)
|
||||
Reference in New Issue
Block a user