Back to Atomvm

Module io_lib

main-apidocs-erlang-estdlib-io-underscore-lib.md

latest3.1 KB
Original Source

Module io_lib

An implementation of the Erlang/OTP io_lib interface.

Description

This module implements a strict subset of the Erlang/OTP io_lib interface.

Data Types

chars()

chars() = [char() | chars()]

Function Index

| format/2 | Format string and data to a string. | | fwrite/2 | Format string and data to a string. | | latin1_char_list/1 | Determine if passed term is a list of ISO-8859-1 characters (0-255). | | printable_list/1 | Determine if List is a flat list of printable characters. | | write/1 | Returns a character list that represents Term. | | write_atom/1 | | | write_binary/3 | | | write_string/1 | Returns the list of characters needed to print String as a string. |

Function Details

format/2

format(Format::io:format(), Args::list()) -> string()

Format: format string
Args: format argument

returns: string

Format string and data to a string. Features most of OTP io_lib:format/2. Raises badarg error if the number of format specifiers does not match the length of the Args.

fwrite/2

fwrite(Format, Args) -> any()

Equivalent to format(Format, Args).

Format string and data to a string. Features most of OTP io_lib:format/2. Raises badarg error if the number of format specifiers does not match the length of the Args.

latin1_char_list/1

latin1_char_list(Term::any()) -> boolean()

Term: term to test

returns: true if Term is a list of latin1 characters, false otherwise.

Determine if passed term is a list of ISO-8859-1 characters (0-255).

printable_list/1

printable_list(List::any()) -> boolean()

List: term to test

Determine if List is a flat list of printable characters

write/1

write(Term::any()) -> chars()

Term: term to represent

Equivalent to forma("~w", [Term]).

Returns a character list that represents Term

write_atom/1

write_atom(Atom::atom()) -> chars()

write_binary/3

write_binary(Binary::binary(), Depth::integer(), CharLimit::integer()) -> {iodata(), binary()}

write_string/1

write_string(String::string()) -> chars()

String: string to print

Equivalent to write_string(String, $").

Returns the list of characters needed to print String as a string.