MyApp.Cldr.ellipsis

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

ellipsis(string, options \\ [])

View Source

Specs

ellipsis(String.t() | [String.t()], Keyword.t()) :: String.t()

Add locale-specific ellipsis to a string.

Arguments

  • string is any String.t or a 2-element list of String.t between which the ellipsis is inserted.

  • backend is any module that includes use Cldr and therefore is a Cldr backend module. The default is Cldr.default_backend!/0. Note that Cldr.default_backend!/0 will raise an exception if no :default_backend is configured under the :ex_cldr key in config.exs.

  • options is a keyword list of options

Options

  • :locale is any valid locale name returned by Cldr.known_locale_names/1. The default is Cldr.get_locale/0.

  • :location determines where to place the ellipsis. The options are :after (the default for a single string argument), :between (the default and only valid location for an argument that is a list of two strings) and :before.

  • :format formats based upon whether the ellipsis is inserted between words or sentences. The valid options are :word or :sentence. The default is :sentence.

Examples

iex> MyApp.Cldr.ellipsis "And furthermore"
"And furthermore…"

iex> MyApp.Cldr.ellipsis ["And furthermore", "there is much to be done"], locale: "ja"
"And furthermore…there is much to be done"

iex> MyApp.Cldr.ellipsis "And furthermore", format: :word
"And furthermore …"

iex> MyApp.Cldr.ellipsis ["And furthermore", "there is much to be done"], locale: "ja", format: :word
"And furthermore … there is much to be done"