PassiveSupport.Item.blank-question-mark
You're seeing just the function
blank-question-mark
, go back to PassiveSupport.Item module for more information.
Link to this function
blank?(item)
Specs
Returns true
for empty enumerables, empty tuples, whitespace-only strings,
nil
, and false
; returns false
for any other value.
Note that while a string containing only whitespace can be considered blank,
a charlist of the same nature will return false
. Because charlists are
represented internally as lists of integers, a charlist of whitespace would
be indescernible from a list of numeric integers, neither of which would be
individually considered blank, and therefore should not be regarded as blank
in tandem.
Examples
iex> blank?({})
true
iex> blank?(%{})
true
iex> blank?(MapSet.new())
true
iex> blank?(0)
false
iex> blank?(nil)
true
iex> blank?(false)
true
iex> blank?(" ")
true
iex> blank?(' ') # [32, 32]
false
iex> blank?(" hi ")
false