MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / WriteStringPadded

Method WriteStringPadded

Source/DocumentFile.cpp:151–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void CDocumentFile::WriteStringPadded(std::string_view sv, std::size_t n) {
152 sv = sv.substr(0, n - 1);
153 WriteBlock({(const unsigned char *)sv.data(), sv.size()});
154 for (std::size_t i = sv.size(); i < n; ++i)
155 WriteBlockChar(0);
156}
157
158void CDocumentFile::WriteStringCounted(std::string_view sv) {
159 WriteBlockInt(sv.size());

Callers 1

SaveSongInfoMethod · 0.80

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected