blob: 5a54d9ef28aab491990bda6d0ebf1a902dece960 [file] [log] [blame]
William A. Kennington III0475b6d2023-07-21 14:28:54 -07001#include <stdplus/print.hpp>
William A. Kennington III64207852023-07-26 14:03:13 -07002
3#include <cstdio>
4#include <system_error>
5
6namespace stdplus
7{
8void prints(std::FILE* stream, std::string_view data)
9{
10 int r = std::fwrite(data.data(), sizeof(char), data.size(), stream);
11 if (r < 0)
12 {
13 throw std::system_error(errno, std::generic_category());
14 }
15}
16} // namespace stdplus