Search results

There are no results.

std.fmt.fmt

Show source code
Hide source code
fn pub fmt[T: Format](value: ref T) -> String {
  let formatter = Formatter.new

  value.fmt(formatter)
  formatter.into_string
}
fn pub static fmt[T: Format](value: ref T) -> String

Formats a value using the default formatter.

Examples

import std.fmt (fmt)

fmt('hello') # => "hello"
fmt([10, 20]) # => '[10, 20]'