14 lines
282 B
C++
14 lines
282 B
C++
#include "StringDecoder.h"
|
|
|
|
std::string_view StringDecoder::read_string_view() {
|
|
size_t length = read_length();
|
|
if (length > Size) {
|
|
ErrBeyondEOF = true;
|
|
return std::string_view();
|
|
}
|
|
std::string_view result(Text, length);
|
|
Text += length;
|
|
Size -= length;
|
|
return result;
|
|
}
|