blob: 0cfd818a16efd04fd6732d3ba0083a3077fe20c8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <iostream>
#include <string>
#include <string_view>
#include <book_store/utility.hh>
namespace book_store::utility {
auto prompt(std::string_view message) -> std::string {
std::string input;
std::cout << message;
std::getline(std::cin, input);
return input;
}
auto clear_cerr() -> void {
if (!std::cerr.good()) {
std::cerr.clear();
}
}
} // namespace book_store::utility
|