MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / read_string

Function read_string

src/doc/string_io.cpp:30–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30std::string read_string(std::istream& is)
31{
32 uint16_t length = read16(is);
33 std::vector<char> str(length+1);
34 if (length > 0) {
35 is.read(&str[0], length);
36 str[length] = 0;
37 }
38 else
39 str[0] = 0;
40
41 return std::string(&str[0]);
42}
43
44}

Callers 5

readDocumentMethod · 0.85
readLayerMethod · 0.85
read_frame_tagFunction · 0.85
read_user_dataFunction · 0.85
read_layerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected