Cldr.Number.Parser.resolve_pers
You're seeing just the function
resolve_pers
, go back to Cldr.Number.Parser module for more information.
Specs
Resolve and tokenize percent and permille sybols from strings within a list.
Percent and permille symbols can be identified at the beginning and/or the end of a string.
Arguments
list
is any list in which percent and permille symbols are expectedoptions
is a keyword list of options
Options
:backend
is any module() that includesuse Cldr
and therefore is aCldr
backend module(). The default isCldr.default_backend!/0
:locale
is any valid locale returned byCldr.known_locale_names/1
or at:Cldr.LanguageTag
struct returned byCldr.Locale.new!/2
The default isoptions[:backend].get_locale()
Examples
iex> Cldr.Number.Parser.scan("100%")
...> |> Cldr.Number.Parser.resolve_pers()
[100, :percent]