30 size_t orig_pos = _pos;
31 _pos = min(_pos + length, _data.length());
32 return _data.substr(orig_pos, length);
50 while (_pos < _data.length() && _data[_pos] !=
'\n') {
54 if (_pos < _data.length() && _data[_pos] ==
'\n') {
59 return _data.substr(start, _pos - start);
string read(size_t length)
Extracts and returns the indicated number of characters from the current data pointer, and advances the data pointer.
string readline()
Assumes the stream represents a text file, and extracts one line up to and including the trailing new...