MCPcopy Create free account
hub / github.com/apple/foundationdb / subTupleRawString

Method subTupleRawString

fdbclient/Tuple.cpp:481–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481StringRef Tuple::subTupleRawString(size_t index) const {
482 if (index >= offsets.size()) {
483 return StringRef();
484 }
485 size_t end = index + 1;
486 size_t endPos = end < offsets.size() ? offsets[end] : data.size();
487 return StringRef(data.begin() + offsets[index], endPos - offsets[index]);
488}
489
490TEST_CASE("/fdbclient/Tuple/makeTuple") {
491 Tuple t1 = Tuple::makeTuple(1,

Callers 3

preprocessMappedKeyFunction · 0.80
constructMappedKeyFunction · 0.80
unpackMethod · 0.80

Calls 3

StringRefClass · 0.50
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected