MCPcopy Create free account
hub / github.com/axmolengine/axmol / StringLessThan

Function StringLessThan

3rdparty/flatbuffers/buffer.h:79–83  ·  view source on GitHub ↗

Lexicographically compare two strings (possibly containing nulls), and return true if the first is less than the second.

Source from the content-addressed store, hash-verified

77// Lexicographically compare two strings (possibly containing nulls), and
78// return true if the first is less than the second.
79static inline bool StringLessThan(const char *a_data, uoffset_t a_size,
80 const char *b_data, uoffset_t b_size) {
81 const auto cmp = memcmp(a_data, b_data, (std::min)(a_size, b_size));
82 return cmp == 0 ? a_size < b_size : cmp < 0;
83}
84
85// When we read serialized data from memory, in the case of most scalars,
86// we want to just read T, but in the case of Offset, we want to actually

Callers 2

operator<Method · 0.85
operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected