Bottle.Binary (Bottle v1.0.1) View Source
Provides custom guards for binaries
Link to this section Summary
Functions
Guard that passes for a binary shorter than max_length
Guard that passes for an empty binary
Guard that passes for a non-empty binary
Guard that passes for a non-empty-binary shorter than max_length
Link to this section Functions
Guard that passes for a binary shorter than max_length
Examples
iex> is_binary_shorter_than("foo", 200)
true
iex> is_binary_shorter_than("", 2)
true
iex> is_binary_shorter_than("foo", 2)
false
Guard that passes for an empty binary
Examples
iex> is_empty_binary("")
true
iex> is_empty_binary("foo")
false
Guard that passes for a non-empty binary
Examples
iex> is_non_empty_binary("false")
true
iex> is_non_empty_binary("")
false
Guard that passes for a non-empty-binary shorter than max_length
Examples
iex> is_non_empty_binary_shorter_than("foo", 200)
true
iex> is_non_empty_binary_shorter_than("", 2)
false
iex> is_non_empty_binary_shorter_than("foo", 2)
false