MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / trimLeft

Method trimLeft

source/core/StarByteArray.cpp:144–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void ByteArray::trimLeft(size_t s) {
145 if (s >= m_size) {
146 clear();
147 } else {
148 std::memmove(m_data, m_data + s, m_size - s);
149 resize(m_size - s);
150 }
151}
152
153void ByteArray::trimRight(size_t s) {
154 if (s >= m_size)

Callers 2

receivePacketsMethod · 0.80
writeDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected