#include "BinaryIO.h" #include //For reading null-terminated strings template StringType ReadString(std::istream& instream) { StringType toReturn{}; typename StringType::value_type buffer{}; BinaryIO::BinaryRead(instream, buffer); while (buffer != 0x00) { toReturn += buffer; BinaryIO::BinaryRead(instream, buffer); } return toReturn; } std::string BinaryIO::ReadString(std::istream& instream) { return ::ReadString(instream); } std::u8string BinaryIO::ReadU8String(std::istream& instream) { return ::ReadString(instream); }