Keywords.new_pattern
You're seeing just the function
new_pattern
, go back to Keywords module for more information.
Generates new keyword-pattern for parsing strings from a list of keywords.
opts -> case_sensitive: true/false -> substrings: true/false defaults -> case_sensitive: false, substrings: false
Examples
iex> Keywords.new_pattern(:stocks, ["TSLA", "XOM", "AMZN"])
{:ok, :stocks}
iex> Keywords.new_pattern(:stocks, ["TSLA", "XOM", "AMZN"])
{:error, :already_started}