[][src]Module liquid::filters

Functions

abs

Returns the absolute value of a number.

append
array_to_sentence_string

Convert an array into a sentence.

at_least

Limits a number to a minimum value.

at_most

Limits a number to a maximum value.

capitalize
ceil
compact

Remove nulls from an iterable. For hashes, you can specify which property you want to filter out if it maps to Null.

concat
date
date_in_tz
default
divided_by
downcase
escape
escape_once
first
floor
invalid_argument
invalid_argument_count
invalid_input
join
last
lstrip

Removes all whitespaces (tabs, spaces, and newlines) from the beginning of a string.

map

Extract property from the Value::Object elements of an array

minus
modulo
newline_to_br

Replaces every newline (\n) with an HTML line break (<br>).

pluralize
plus
pop

Receives a Value::Array as an input. Returns a copy of the input with the last element removed.

prepend
push

Receives a Value::Array as an input. Returns a copy of the input with the given value appended at the end.

remove
remove_first
replace
replace_first
reverse

Reverses the order of the items in an array. reverse cannot reverse a string.

round
rstrip

Removes all whitespace (tabs, spaces, and newlines) from the right side of a string.

shift

Receives a Value::Array as an input. Returns a copy of the input with the first element removed.

size
slice
sort
sort_natural
split
strip

Removes all whitespace (tabs, spaces, and newlines) from both the left and right side of a string.

strip_html
strip_newlines

Removes any newline characters (line breaks) from a string.

times
truncate

truncate shortens a string down to the number of characters passed as a parameter.

truncatewords
uniq

Removes any duplicate elements in an array.

unshift

Receives a Value::Array as an input. Returns a copy of the input with the given value appended at the beginning.

upcase
url_decode
url_encode