xtd 0.2.0
Loading...
Searching...
No Matches
format_with_alignment.cpp

Show how to use format xtd::format class with alignment.

#include <xtd/xtd>
auto main() -> int {
console::out << string::format("[{,10}]", 42) << environment::new_line;
console::out << string::format("[{,-10}]", 42) << environment::new_line;
console::out << string::format("[{:D10}]", 42) << environment::new_line;
}
// This code produces the following output :
//
// [ 42]
// [42 ]
// [0000000042]