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

Method GetByteString

Source/ChunkRenderText.cpp:464–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464std::string CChunkRenderText::GetByteString(array_view<unsigned char> Data, int LineBreak) { // // //
465 std::string str = "\t.byte ";
466
467 int i = 0;
468 while (!Data.empty()) {
469 str += '$';
470 str += conv::sv_from_uint_hex(Data.front(), 2);
471 Data.pop_front();
472
473 if (!Data.empty()) {
474 if ((i % LineBreak == (LineBreak - 1)))
475 str += "\n\t.byte ";
476 else
477 str += ", ";
478 }
479
480 ++i;
481 }
482
483 str += '\n';
484 return str;
485}
486
487std::string CChunkRenderText::GetByteString(const CChunk *pChunk, int LineBreak) { // // //
488 int len = pChunk->GetLength();

Callers

nothing calls this directly

Calls 6

sv_from_uint_hexFunction · 0.85
emptyMethod · 0.80
frontMethod · 0.80
pop_frontMethod · 0.80
GetLengthMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected