Skip to content

Instantly share code, notes, and snippets.

@dirkgr
Created July 18, 2014 23:32
Show Gist options
  • Save dirkgr/535cc744f76e4b7038cf to your computer and use it in GitHub Desktop.
Save dirkgr/535cc744f76e4b7038cf to your computer and use it in GitHub Desktop.
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