Skip to content

Instantly share code, notes, and snippets.

View SuppieRK's full-sized avatar
🎯
Focusing

Roman Khlebnov SuppieRK

🎯
Focusing
View GitHub Profile
@SuppieRK
SuppieRK / CaseMatcher.kt
Last active September 30, 2024 07:09
Regular expressions for case matching
/**
* Different case matchers
*
* @see <a href="https://en.wikipedia.org/wiki/Naming_convention_(programming)#Examples_of_multiple-word_identifier_formats">Examples of multiple word identifier formats</
*/
sealed class CaseMatcher(private val regex: Regex) {
open fun notMatches(source: String?): Boolean {
return !matches(source)
}