We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3860240 commit 69fe2a7Copy full SHA for 69fe2a7
src/libcollections/fmt.rs
@@ -407,6 +407,21 @@
407
//! For floating-point types, this indicates how many digits after the decimal
408
//! point should be printed.
409
//!
410
+//! By example, these:
411
+//!
412
+//! ```
413
+//! println!("Hello {1} is {2:.0$}", 5, "x", 0.01);
414
+//! println!("Hello {0} is {2:.1$}", "x", 5, 0.01);
415
+//! println!("Hello {} is {:.*}", "x", 5, 0.01);
416
+//! println!("Hello {} is {2:.*}", "x", 5, 0.01);
417
418
419
+//! All print the same thing:
420
421
+//! ```text
422
+//! Hello x is 0.01000
423
424
425
//! # Escaping
426
427
//! The literal characters `{` and `}` may be included in a string by preceding
0 commit comments