Created
July 18, 2014 23:32
-
-
Save dirkgr/535cc744f76e4b7038cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class CaseInsensitiveString(string: String) { | |
def =~(other: String): Boolean = | |
string equalsIgnoreCase other | |
def startsWithI(other: String) : Boolean = | |
string.toLowerCase startsWith other.toLowerCase | |
} | |
implicit def makeCaseInsensitiveString(string: String) = | |
new CaseInsensitiveString(string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment