Skip to content

Instantly share code, notes, and snippets.

@tkausch
Created October 23, 2020 15:08
Show Gist options
  • Save tkausch/2c3fe33164aaf0bbc0cbe92e3a0bc425 to your computer and use it in GitHub Desktop.
Save tkausch/2c3fe33164aaf0bbc0cbe92e3a0bc425 to your computer and use it in GitHub Desktop.
How to run case insensitive search of string in another
if let range3 = string.range(of: "rain", options: .caseInsensitive) {
// match
} else {
// no match
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment