MCPcopy Create free account
hub / github.com/Illation/ETEngine / ReadString

Method ReadString

Engine/source/EtCore/FileSystem/BinaryReader.cpp:56–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55
56std::string BinaryReader::ReadString()
57{
58 if (m_pReader == nullptr)
59 {
60 LOG("BinaryReader doesn't exist! Unable to read binary data...", Warning);
61 return "";
62 }
63
64 int32 stringLength = (int32)Read<uint8>();
65
66 std::stringstream ss;
67 for (int32 i = 0; i<stringLength; ++i)
68 {
69 ss << Read<uint8>();
70 }
71
72 return (std::string)ss.str();
73}
74
75void BinaryReader::Open( const std::vector<uint8> &binaryContent, uint32 start, uint32 count )
76{

Callers

nothing calls this directly

Calls 1

strMethod · 0.80

Tested by

no test coverage detected