Std.Show (Cure Standard Library v0.37.2)

View Source

The Show protocol: convert values to their human-readable String form.

This is the counterpart of Elixir's String.Chars / Inspect split: show/1 produces a representation suitable for debugging and log output. Strings are wrapped in quotes, atoms are prefixed with :; callers that want raw text should use Std.String.from_* instead.

Examples

use Std.Show

show(42)                                # => "42"
show("hi")                              # => "\"hi\""
show(:ok)                               # => ":ok"
show_line(true)                         # => "true\n"