|
template<typename D = std::string, typename std::enable_if_t< is_contiguous_v< D >, int > = 0> |
auto | kblib::get_contents (std::istream &in, D &out) -> auto |
|
template<typename D = std::string, typename string > |
auto | kblib::get_file_contents (const string &filename) -> std::optional< D > |
| Read the entire contents of a file into a container, such as std::string or std::vector<char>. Note that it will be most efficient to read into contiguous containers, as opposed to non-contiguous containers. More...
|
|
template<typename D = std::string, typename string > |
auto | kblib::try_get_file_contents (const string &filename) -> D |
| Read the entire contents of a file into a container, such as std::string or std::vector<char>. Note that it will be most efficient to read into contiguous containers, as opposed to non-contiguous containers. More...
|
|
auto | kblib::getline (std::istream &is) -> std::string |
| By-value std::getline wrapper. More...
|
|
auto | kblib::eat_word (std::istream &is) -> std::istream & |
| Consume all non-spaces to first break, then eat that, too. More...
|
|
std::istream & | kblib::eat_space (std::istream &is) |
| Eat spaces, don't eat an extra. More...
|
|
template<typename CharT , typename Traits > |
auto | kblib::nl (std::basic_istream< CharT, Traits > &is) -> std::basic_istream< CharT, Traits > & |
| Read in spaces until the end of the line is found. More...
|
|
template<typename CharT > |
auto | kblib::unformatted_expect (CharT c) -> auto |
| Read a character from an input stream only if it equals c. Acts as an UnformattedInputOperation, that is, it will not ignore any leading whitespace. More...
|
|
template<typename CharT > |
auto | kblib::expect (CharT c) -> auto |
| Read a character from an input stream only if it equals c. Acts as a FormattedInputOperation, that is, leading whitespace is ignored. More...
|
|
template<typename CharT , typename... O, template< typename, typename... > class string> |
auto | kblib::get_line (string< CharT, O... > &str) -> auto |
| Read a whole line into a std::basic_string-like class template. More...
|
|
template<typename CharT , typename... O, template< typename, typename... > class string> |
auto | kblib::get_line (string< CharT, O... > &str, CharT delim) -> auto |
| Read a delimited string into a std::basic_string-like class template. More...
|
|
template<typename F , typename CharT , typename Tr > |
std::basic_istream< CharT, Tr > & | kblib::operator>> (std::basic_istream< CharT, Tr > &is, get_manip< F > func) |
| Actually calls the manipulator. More...
|
|
template<typename F , typename CharT , typename Tr > |
std::basic_ostream< CharT, Tr > & | kblib::operator<< (std::basic_ostream< CharT, Tr > &is, get_manip< F > func) |
| Actually calls the manipulator. More...
|
|
template<typename StreamA , typename StreamB > |
auto | kblib::tee (StreamA &a, StreamB &b) -> basic_teestream< StreamA, StreamB > |
|
template<typename File = std::fstream> |
auto | kblib::scoped_file (const std::filesystem::path &path, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out) |
|
template<typename File = std::fstream> |
auto | kblib::tmpfile (const std::filesystem::path &path, std::ios_base::openmode mode=std::ios_base::in|std::ios_base::out) |
|