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

Method sub

source/core/StarByteArray.cpp:123–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123ByteArray ByteArray::sub(size_t b, size_t s) const {
124 if (b == 0 && s >= m_size) {
125 return ByteArray(*this);
126 } else {
127 return ByteArray(m_data + b, min(m_size, b + s));
128 }
129}
130
131ByteArray ByteArray::left(size_t s) const {
132 return sub(0, s);

Callers

nothing calls this directly

Calls 1

ByteArrayClass · 0.85

Tested by

no test coverage detected