Ergo.Utils.ellipsize
You're seeing just the function
ellipsize
, go back to Ergo.Utils module for more information.
Link to this function
ellipsize(str, max \\ 40)
If the string str
is longer than max
(default: 40) it is truncated to 37 chars and "..." is added to the end, otherwise it is returned unaltered.
Examples
iex> Ergo.Utils.ellipsize("frob")
"frob"
iex> Ergo.Utils.ellipsize("123456789012345678901234567890123456789012345678901")
"1234567890123456789012345678901234567..."
iex> Ergo.Utils.ellipsize("12345678901234567890", 10)
"1234567..."
iex> Ergo.Utils.ellipsize("12345", 4)
"1..."