MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / setLast

Method setLast

tests/framework/src/doctest.cpp:524–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522
523void String::setOnHeap() noexcept { *reinterpret_cast<unsigned char*>(&buf[last]) = 128; }
524void String::setLast(size_type in) noexcept { buf[last] = char(in); }
525void String::setSize(size_type sz) noexcept {
526 if (isOnStack()) { buf[sz] = '\0'; setLast(last - sz); }
527 else { data.ptr[sz] = '\0'; data.size = sz; }

Callers 2

StringMethod · 0.80
doctest.cppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected