A.IO.to_iodata
You're seeing just the function
to_iodata
, go back to A.IO module for more information.
Specs
to_iodata(String.Chars.t() | iodata() | IO.chardata()) :: iodata() | IO.chardata()
Converts the argument to IO data according to the String.Chars
protocol.
Leaves lists untouched without any validation, calls to_string/1
on everything else.
This is the function invoked in string interpolations within the i sigil.
Works with both IO data and
Chardata,
depending on the type of the data
parameter.
Examples
iex> A.IO.to_iodata(:foo)
"foo"
iex> A.IO.to_iodata(99)
"99"
iex> A.IO.to_iodata(["abc", 'def' | "ghi"])
["abc", 'def' | "ghi"]