RUSTPRINT

Type to search the reference.

FLAGSHIP TOOL // STD::FMT

Rust Format Explorer

Parse a Rust replacement field, understand every token, and generate a compiler-ready example.

Parsed as a supported single-field std::fmt specification.

{:format spec>alignment10width.2precision}

:format specStarts the format specification for this argument.

>alignment< left, ^ center, or > right alignment.

10widthMinimum output width. A named $ parameter reads a usize from another argument.

.2precisionFloat decimal places or maximum string length; accepts a literal, named $, or *.

Rust-matched floating-point example
      3.14
Matches Rust for the selected sample value.
Rust code
println!("{:>10.2}", 3.14159_f64);
Open Rust Playground ↗
Explorer scope

one replacement field using the practical std::fmt format_spec subset.

Intentionally unsupported: literal text or multiple replacement fields; numeric positional $ width and precision parameters; raw r# identifiers; positional indices above 16; literal width or precision above 1000; a named value reused as its own dynamic count; positional value 0 combined with .*.