We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0ecfbf commit ae8def3Copy full SHA for ae8def3
lib/elixir/lib/string.ex
@@ -860,11 +860,9 @@ defmodule String do
860
861
"""
862
def contains?(string, matches) when is_list(matches) do
863
- Enum.any? matches, fn match ->
864
- case :binary.matches(string, match) do
865
- [_] -> true
866
- [] -> false
867
- end
+ case :binary.match(string, matches) do
+ :nomatch -> false
+ _ -> true
868
end
869
870
0 commit comments