Skip to content

Commit

Permalink
Review examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Dec 16, 2024
1 parent bc8d819 commit d1ef997
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/xtd.core.examples/format/format/src/format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using namespace xtd;

auto main() -> int {
console::out << string::format("{} {} {} {}", "string", "literal"_s, 42, 'a') << environment::new_line;
console::out << string::format("{} {} {} {}", "string"_s, "literal", 42, 'a') << environment::new_line;
}

// This code produces the following output :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ auto print_duration(const string& text, const std::chrono::duration<type_t, peri
if (c == cap::title)
console::out
<< "┌────────────────────────────────────────────────────┬────────────┬────────────────────────────┐" << environment::new_line
<< "time_span │ format │ representation │" << environment::new_line
<< "duration │ format │ representation │" << environment::new_line
<< "├────────────────────────────────────────────────────┼────────────┼────────────────────────────┤" << environment::new_line;

console::out << "" << text.pad_right(50) << " │ {} │ " << string::format("{}", value).pad_right(26) << " |" << environment::new_line;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ auto print_number(const string& text, int value, cap c) {
if (c == cap::title)
console::out
<< "┌───────────┬────────────┬──────────────────────────────────┐" << environment::new_line
<< "│ number │ format │ representation │" << environment::new_line
<< "├───────────┼────────────┼──────────────────────────────────┤" << environment::new_line;
<< "│ number │ format │ representation │" << environment::new_line
<< "├───────────┼────────────┼──────────────────────────────────┤" << environment::new_line;

console::out << "" << text.pad_right(9) << " │ {} │ " << string::format("{}", value).pad_right(32) << " |" << environment::new_line;
console::out << "" << text.pad_right(9) << " │ {:b} │ " << string::format("{:b}", value).pad_right(32) << " |" << environment::new_line;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ auto print_system_clock(const string& text, const std::chrono::time_point<clock_
if (c == cap::title)
console::out
<< "┌──────────────────────────────────┬────────────┬──────────────────────────────────────────┐" << environment::new_line
<< "date_time │ format │ representation │" << environment::new_line
<< "system_clock │ format │ representation │" << environment::new_line
<< "├──────────────────────────────────┼────────────┼──────────────────────────────────────────┤" << environment::new_line;

console::out << "" << text.pad_right(32) << " │ {} │ " << string::format("{}", value).pad_right(40) << " |" << environment::new_line;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ auto print_tm(const string& text, const std::tm& value, cap c) {
if (c == cap::title)
console::out
<< "┌──────────────────────────────────┬────────────┬──────────────────────────────────────────┐" << environment::new_line
<< "date_time │ format │ representation │" << environment::new_line
<< "tm │ format │ representation │" << environment::new_line
<< "├──────────────────────────────────┼────────────┼──────────────────────────────────────────┤" << environment::new_line;

console::out << "" << text.pad_right(32) << " │ {} │ " << string::format("{}", value).pad_right(40) << " |" << environment::new_line;
Expand Down

0 comments on commit d1ef997

Please sign in to comment.