Fulib v0.1.4 Fulib.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
parse_printf(format) View Source
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"
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
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"