Skip to content

Commit

Permalink
Rollup merge of rust-lang#34462 - dns2utf8:leading_zeros, r=Guillaume…
Browse files Browse the repository at this point in the history
…Gomez

Add example with leading zeros

I was searching for this format very long. So I added an example to the prominent section.

I was thinking of putting the keyword leading in the corresponding section as well, what do you think?

r? @steveklabnik
  • Loading branch information
GuillaumeGomez authored Jun 28, 2016
2 parents 86e4a03 + 6418cb4 commit b765edf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libcollections/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
//! format!("{:?}", (3, 4)); // => "(3, 4)"
//! format!("{value}", value=4); // => "4"
//! format!("{} {}", 1, 2); // => "1 2"
//! format!("{:04}", 42); // => "0042" with leading zeros
//! ```
//!
//! From these, you can see that the first argument is a format string. It is
Expand Down

0 comments on commit b765edf

Please sign in to comment.