Liquex.Filter.slice

You're seeing just the function slice, go back to Liquex.Filter module for more information.
Link to this function

slice(value, start, length \\ 1, _)

View Source

Returns a substring of 1 character beginning at the index specified by the first argument. An optional second argument specifies the length of the substring to be returned.

Examples

iex> Liquex.Filter.slice("Liquid", 0, %{})
"L"

iex> Liquex.Filter.slice("Liquid", 2, %{})
"q"

iex> Liquex.Filter.slice("Liquid", 2, 5, %{})
"quid"

If the first argument is a negative number, the indices are counted from the end of the string:

Examples

iex> Liquex.Filter.slice("Liquid", -3, 2, %{})
"ui"