<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"The number is </span><spanclass="format_specifier">{</span><spanclass="format_specifier">}</span><spanclass="string_literal">"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">1</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span><spanclass="comment">// => "The number is 1"</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"</span><spanclass="format_specifier">{</span><spanclass="format_specifier">:</span><spanclass="numeric_literal">0</span><spanclass="numeric_literal">4</span><spanclass="format_specifier">}</span><spanclass="string_literal">"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">42</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span><spanclass="comment">// => "0042" with leading zerosV</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"Hello </span><spanclass="format_specifier">{</span><spanclass="numeric_literal">0</span><spanclass="format_specifier">}</span><spanclass="string_literal"> is </span><spanclass="format_specifier">{</span><spanclass="numeric_literal">1</span><spanclass="format_specifier">:</span><spanclass="format_specifier">.</span><spanclass="numeric_literal">5</span><spanclass="format_specifier">}</span><spanclass="string_literal">"</span><spanclass="punctuation">,</span><spanclass="string_literal">"x"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">0.01</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"Hello </span><spanclass="format_specifier">{</span><spanclass="numeric_literal">1</span><spanclass="format_specifier">}</span><spanclass="string_literal"> is </span><spanclass="format_specifier">{</span><spanclass="numeric_literal">2</span><spanclass="format_specifier">:</span><spanclass="format_specifier">.</span><spanclass="numeric_literal">0</span><spanclass="format_specifier">$</span><spanclass="format_specifier">}</span><spanclass="string_literal">"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">5</span><spanclass="punctuation">,</span><spanclass="string_literal">"x"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">0.01</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"Hello </span><spanclass="format_specifier">{</span><spanclass="numeric_literal">0</span><spanclass="format_specifier">}</span><spanclass="string_literal"> is </span><spanclass="format_specifier">{</span><spanclass="numeric_literal">2</span><spanclass="format_specifier">:</span><spanclass="format_specifier">.</span><spanclass="numeric_literal">1</span><spanclass="format_specifier">$</span><spanclass="format_specifier">}</span><spanclass="string_literal">"</span><spanclass="punctuation">,</span><spanclass="string_literal">"x"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">5</span><spanclass="punctuation">,</span><spanclass="numeric_literal">0.01</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"Hello </span><spanclass="format_specifier">{</span><spanclass="format_specifier">}</span><spanclass="string_literal"> is </span><spanclass="format_specifier">{</span><spanclass="format_specifier">:</span><spanclass="format_specifier">.</span><spanclass="format_specifier">*</span><spanclass="format_specifier">}</span><spanclass="string_literal">"</span><spanclass="punctuation">,</span><spanclass="string_literal">"x"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">5</span><spanclass="punctuation">,</span><spanclass="numeric_literal">0.01</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"Hello </span><spanclass="format_specifier">{</span><spanclass="format_specifier">}</span><spanclass="string_literal"> is </span><spanclass="format_specifier">{</span><spanclass="numeric_literal">2</span><spanclass="format_specifier">:</span><spanclass="format_specifier">.</span><spanclass="format_specifier">*</span><spanclass="format_specifier">}</span><spanclass="string_literal">"</span><spanclass="punctuation">,</span><spanclass="string_literal">"x"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">5</span><spanclass="punctuation">,</span><spanclass="numeric_literal">0.01</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"Hello </span><spanclass="format_specifier">{</span><spanclass="format_specifier">}</span><spanclass="string_literal"> is </span><spanclass="format_specifier">{</span><spanclass="variable">number</span><spanclass="format_specifier">:</span><spanclass="format_specifier">.</span><spanclass="variable">prec</span><spanclass="format_specifier">$</span><spanclass="format_specifier">}</span><spanclass="string_literal">"</span><spanclass="punctuation">,</span><spanclass="string_literal">"x"</span><spanclass="punctuation">,</span> prec <spanclass="punctuation">=</span><spanclass="numeric_literal">5</span><spanclass="punctuation">,</span> number <spanclass="punctuation">=</span><spanclass="numeric_literal">0.01</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"</span><spanclass="format_specifier">{</span><spanclass="format_specifier">}</span><spanclass="string_literal">, `</span><spanclass="format_specifier">{</span><spanclass="variable">name</span><spanclass="format_specifier">:</span><spanclass="format_specifier">.</span><spanclass="format_specifier">*</span><spanclass="format_specifier">}</span><spanclass="string_literal">` has 3 fractional digits"</span><spanclass="punctuation">,</span><spanclass="string_literal">"Hello"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">3</span><spanclass="punctuation">,</span> name<spanclass="punctuation">=</span><spanclass="numeric_literal">1234.56</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"</span><spanclass="format_specifier">{</span><spanclass="format_specifier">}</span><spanclass="string_literal">, `</span><spanclass="format_specifier">{</span><spanclass="variable">name</span><spanclass="format_specifier">:</span><spanclass="format_specifier">.</span><spanclass="format_specifier">*</span><spanclass="format_specifier">}</span><spanclass="string_literal">` has 3 characters"</span><spanclass="punctuation">,</span><spanclass="string_literal">"Hello"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">3</span><spanclass="punctuation">,</span> name<spanclass="punctuation">=</span><spanclass="string_literal">"1234.56"</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"</span><spanclass="format_specifier">{</span><spanclass="format_specifier">}</span><spanclass="string_literal">, `</span><spanclass="format_specifier">{</span><spanclass="variable">name</span><spanclass="format_specifier">:</span><spanclass="format_specifier">></span><spanclass="numeric_literal">8</span><spanclass="format_specifier">.</span><spanclass="format_specifier">*</span><spanclass="format_specifier">}</span><spanclass="string_literal">` has 3 right-aligned characters"</span><spanclass="punctuation">,</span><spanclass="string_literal">"Hello"</span><spanclass="punctuation">,</span><spanclass="numeric_literal">3</span><spanclass="punctuation">,</span> name<spanclass="punctuation">=</span><spanclass="string_literal">"1234.56"</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>
<spanclass="macro">println!</span><spanclass="punctuation">(</span><spanclass="string_literal">"</span><spanclass="format_specifier">{</span><spanclass="escape_sequence">\x41</span><spanclass="format_specifier">}</span><spanclass="string_literal">"</span><spanclass="punctuation">,</span> A <spanclass="punctuation">=</span><spanclass="numeric_literal">92</span><spanclass="punctuation">)</span><spanclass="punctuation">;</span>