List.ascii_printable-question-mark
You're seeing just the function
ascii_printable-question-mark
, go back to List module for more information.
Specs
ascii_printable?(list(), 0) :: true
ascii_printable?([], limit) :: true when limit: :infinity | pos_integer()
ascii_printable?([...], limit) :: boolean() when limit: :infinity | pos_integer()
Checks if list
is a charlist made only of printable ASCII characters.
Takes an optional limit
as a second argument. ascii_printable?/2
only
checks the printability of the list up to the limit
.
A printable charlist in Elixir contains only the printable characters in the standard seven-bit ASCII character encoding, which are characters ranging from 32 to 126 in decimal notation, plus the following control characters:
?\a
- Bell?\b
- Backspace?\t
- Horizontal tab?\n
- Line feed?\v
- Vertical tab?\f
- Form feed?\r
- Carriage return?\e
- Escape
For more information read the Character groups section in the Wikipedia article of the ASCII standard.
Examples
iex> List.ascii_printable?('abc')
true
iex> List.ascii_printable?('abc' ++ [0])
false
iex> List.ascii_printable?('abc' ++ [0], 2)
true
Improper lists are not printable, even if made only of ASCII characters:
iex> List.ascii_printable?('abc' ++ ?d)
false