18 size_t size = str.size();
19 size_t capacity = str.capacity();
20 std::streamsize rest = capacity - size;
24 capacity =
std::max(static_cast<size_t>(8), capacity * 2);
25 rest = capacity - size;
32 is.getline(const_cast<char*>(str.data()) + size, rest, delim);
35 size_t new_size = size + is.gcount();
40 if (is.gcount() + 1 == rest) {
43 str.reserve(capacity * 2);
static uint_pair max()
return an uint_pair instance containing the largest value possible
std::basic_string< char, std::char_traits< char >, Allocator< char > > string
string with Manager tracking
std::istream & appendline(std::istream &is, std::string &str, char delim)