Cldr.Number.Parser.resolve_per
You're seeing just the function
resolve_per, go back to Cldr.Number.Parser module for more information.
Specs
resolve_per(String.t(), Keyword.t()) :: per() | [per() | String.t()] | {:error, {module(), String.t()}}
Resolve and tokenize percent or permille from the beginning and/or the end of a string
Arguments
listis any list in which percent and permille symbols are expectedoptionsis a keyword list of options
Options
:backendis any module() that includesuse Cldrand therefore is aCldrbackend module(). The default isCldr.default_backend!/0:localeis any valid locale returned byCldr.known_locale_names/1or aCldr.LanguageTagstruct returned byCldr.Locale.new!/2The default isoptions[:backend].get_locale()
Returns
An
:percentorpermilleor{:error, {exception, message}}
Examples
iex> Cldr.Number.Parser.resolve_per "11%"
["11", :percent]
iex> Cldr.Number.Parser.resolve_per "% of linguists"
[:percent, " of linguists"]
iex> Cldr.Number.Parser.resolve_per "% of linguists %"
[:percent, " of linguists ", :percent]