We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContainsAny("nekochan", []string{"neko", "nyaan", "cat"})
true
EqualsAny("nekochan", []string{"neko", "nyaan", "cat"})
false
EqualsAny("neko", []string{"neko", "nyaan", "cat"})
Use functions above instead of the following code:
text := "nekochan" list := []string{"neko", "nyaan", "cat"} test := false for _, e := range list { if strings.Contains(text, e) == false { continue } test = true; break }
The text was updated successfully, but these errors were encountered:
Use sisimai/string.ContainsAny() instead of for { ... for {}} #6
3a6bada
No branches or pull requests
ContainsAny()
ContainsAny("nekochan", []string{"neko", "nyaan", "cat"})
returnstrue
EqualsAny()
EqualsAny("nekochan", []string{"neko", "nyaan", "cat"})
returnsfalse
EqualsAny("neko", []string{"neko", "nyaan", "cat"})
returnstrue
Use functions above instead of the following code:
The text was updated successfully, but these errors were encountered: