Cldr.Substitution.substitute

You're seeing just the function substitute, go back to Cldr.Substitution module for more information.

Specs

substitute(term() | [term(), ...], [String.t() | integer(), ...]) :: [
  term(),
  ...
]

Substitutes a list of values into a template token list that is created by Cldr.Substitution.parse/1.

Returns:

  • A list with values substituted for parameters in the list1 template

Examples:

iex> template = Cldr.Substitution.parse "{0} This is something {1}"
[0, " This is something ", 1]
iex> Cldr.Substitution.substitute ["a", "b"], template
["a", " This is something ", "b"]