rust-lang/rust — pull request #16885 by wickerwaka (2014-08-30 18:36:13+00:00)
Title: Center alignment for fmt

Use '|' to specify center alignment in format strings.

fmt!( "[{:|5s}]", "Hi" ) -> "[ Hi ]"
fmt!( "[{:|5s}]", "H" ) -> "[ H ]"
fmt!( "[{:|5d}]", 1i ) -> "[ 1 ]"
fmt!( "[{:|5d}]", -1i ) -> "[ -1 ]"
fmt!( "[{:|6d}]", 1i ) -> "[ 1 ]"
fmt!( "[{:|6d}]", -1i ) -> "[ -1 ]"

If the padding is odd then the padding on the right will be one
character longer than the padding on the left.