true
.b = 6
, the table below illustrates the comparison operators and the way they interact with b
:==
b == 6
true
!=
b != 6
false
>
b > 5
true
<
b < 6
false
>=
b >= 6
true
<=
b <= 6
true
blank
or empty
. In this way, Liquid allows the author to ask, "is this value blank?", or "is this value empty?"An object is blank if it's false, empty, or a whitespace string. For example,nil
, '', ' ', [], {}, andfalse
are all blank.
contains
operator is used to check for the existence of a substring in a string, or for a specific element in an array.and
and or
.b = 3
and c = 6
, the table below illustrates the logical operators in Liquid, and the way they interact with b
and b
:and
b < 2 and c < 6
false
or
b < 2 or c < 6
true