Cldr.AcceptLanguage.tokenize

You're seeing just the function tokenize, go back to Cldr.AcceptLanguage module for more information.
Link to this function

tokenize(accept_language)

View Source

Specs

tokenize(String.t()) :: [{float(), String.t()}, ...]

Splits the language ranges for an Accept-Language header value into tuples {quality, language}.

  • accept-language is any string in the format defined by rfc2616

Example

iex> Cldr.AcceptLanguage.tokenize "da,zh-TW;q=0.3"
[{1.0, "da"}, {0.3, "zh-tw"}]