Created
January 1, 2015 22:26
-
-
Save techjanitor/604bb6e4cae5b9facfed to your computer and use it in GitHub Desktop.
Case insensitive string comparison
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
func contains(s []string, e string) bool { | |
for _, a := range s { | |
if strings.EqualFold(a, e) { | |
return true | |
} | |
} | |
return false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment