Gulib v0.1.0 Gulib.Printf View Source

A printf/sprintf library for Elixir. It works as a wrapper for :io.format.

Link to this section Summary

Functions

Returns the Elixir’s :io.format string based on the printf-formatted input parameters. The params argument needs to be List

Prints the parsed string to stdout based the printf-formatted input parameters. The params argument needs to be List

Returns the parsed string based on the printf-formatted input parameters. The params argument needs to be List

Link to this section Functions

Returns the Elixir’s :io.format string based on the printf-formatted input parameters. The params argument needs to be List.

Examples

iex> parse_printf("%05d\n")
"~5..0B\n"
Link to this function printf(format, params \\ []) View Source

Prints the parsed string to stdout based the printf-formatted input parameters. The params argument needs to be List.

Examples

iex> printf("%d\n", [10])
10
:ok
Link to this function sprintf(format, params \\ []) View Source

Returns the parsed string based on the printf-formatted input parameters. The params argument needs to be List.

Examples

iex> sprintf("%d\n", [10])
"10\n"