MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / StringLessThan

Function StringLessThan

Libs/flatbuffers/flatbuffers.h:697–701  ·  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

695// Lexicographically compare two strings (possibly containing nulls), and
696// return true if the first is less than the second.
697static inline bool StringLessThan(const char *a_data, uoffset_t a_size,
698 const char *b_data, uoffset_t b_size) {
699 const auto cmp = memcmp(a_data, b_data, (std::min)(a_size, b_size));
700 return cmp == 0 ? a_size < b_size : cmp < 0;
701}
702
703struct String : public Vector<char> {
704 const char *c_str() const { return reinterpret_cast<const char *>(Data()); }

Callers 2

operator<Method · 0.85
operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected