14#ifndef OPENVPN_COMMON_SPLITLINES_H
15#define OPENVPN_COMMON_SPLITLINES_H
22template <
typename STRING>
41 :
data((const char *)str.c_str()),
126 return std::move(
line);
153 const bool s = (*this)(trim);
158 ln = std::move(
line);
169 throw overflow_error(
line);
bool line_overflow() const
Status next(std::string &ln, const bool trim=true)
OPENVPN_EXCEPTION(overflow_error)
const size_t max_line_len
SplitLinesType(const STRING &str, const size_t max_line_len_arg=0)
const std::string & line_ref() const
OPENVPN_EXCEPTION(moved_error)
bool operator()(const bool trim=true)
@ S_ERROR
line was longer than allowed
@ S_EOF
no further characters are available
@ S_OKAY
next line was successfully read
void trim_crlf(STRING &str)
Support deferred server-side state creation when client connects.
SplitLinesType< std::string > SplitLines