staticlib_io  1.2.11
 All Classes Namespaces Files Functions Variables
Namespaces | Functions
operations.hpp File Reference
#include <cstdint>
#include <cstdlib>
#include <cerrno>
#include <algorithm>
#include <array>
#include <ios>
#include <sstream>
#include <string>
#include "staticlib/config.hpp"
#include "staticlib/io/io_exception.hpp"
#include "staticlib/io/span.hpp"
#include "staticlib/io/replacer_source.hpp"
#include "staticlib/io/string_sink.hpp"
#include "staticlib/io/string_source.hpp"

Go to the source code of this file.

Namespaces

namespace  staticlib
namespace  staticlib::io

Functions

template<typename Sink >
void staticlib::io::write_all (Sink &sink, span< const char > span)
 Writes buffer contents to the specified Sink ensuring that the specified number of bytes are written to Sink (making multiple write calls to Sink if needed).
template<typename Source >
size_t staticlib::io::read_all (Source &src, span< char > span)
 Reads specified number of bytes from the Source into the buffer.
template<typename Source >
void staticlib::io::read_exact (Source &src, span< char > span)
 Reads specified number of bytes from the Source into the buffer.
template<typename Source , typename Sink >
size_t staticlib::io::copy_all (Source &src, Sink &sink, span< char > span)
 Copies data from Source to Sink using specified buffer until source will be exhausted.
template<typename Source , typename Sink , uint16_t BufferSize = 4096>
size_t staticlib::io::copy_all (Source &src, Sink &sink)
 Copies data from Source to Sink using on-stack array buffer until source will be exhausted.
template<typename Source , typename IntTypeSkip >
void staticlib::io::skip (Source &src, span< char > span, IntTypeSkip to_skip)
 Skips specified number of bytes reading data repeatedly from specified source into specified buffer.
std::string staticlib::io::str_replace (const std::string &input, std::map< std::string, std::string > values)
 Replaces "{{placeholders}}" with specified values in specified string.