Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
daheige committed Jan 1, 2022
1 parent f17df11 commit daf6870
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions format/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ fn main() {

// 你可以在数字左边补 0。下面语句输出 "000001",填充
println!("{number:>0width$}", number = 1, width = 6);
println!("{}", 111) // 占位符的模式打印
}

0 comments on commit daf6870

Please sign in to comment.