Compare commits

..

2 Commits

Author SHA1 Message Date
bf48bc3565 Bump version to 1.5.0 2025-02-13 08:03:10 +01:00
aad373a5b5 Add clear_screen manipulator 2025-02-13 08:02:39 +01:00
3 changed files with 8 additions and 1 deletions

View File

@ -12,7 +12,7 @@ PRODUCT := lib
# Single source of truth for version.
MAJOR := 1
MINOR := 4
MINOR := 5
PATCH := 0
# Specify desired C++ standard for this project.

View File

@ -46,6 +46,12 @@ std::ostream& sc::io::show_cursor(std::ostream& out) {
return out;
}
std::ostream& sc::io::clear_screen(std::ostream& out) {
if (should_color(out))
out << "\x1b" << 'c';
return out;
}
std::ostream& sc::io::reset(std::ostream& out) {
if (should_color(out))
out << "\x1b[m";

View File

@ -11,6 +11,7 @@ namespace sc {
std::ostream& hide_cursor(std::ostream& out);
std::ostream& show_cursor(std::ostream& out);
std::ostream& clear_screen(std::ostream& out);
std::ostream& reset(std::ostream& out);
std::ostream& bold(std::ostream& out);