MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / StringLessThan

Function StringLessThan

native/thirdpart/flatbuffers/flatbuffers.h:622–626  ·  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

620// Lexicographically compare two strings (possibly containing nulls), and
621// return true if the first is less than the second.
622static inline bool StringLessThan(const char *a_data, uoffset_t a_size,
623 const char *b_data, uoffset_t b_size) {
624 const auto cmp = memcmp(a_data, b_data, (std::min)(a_size, b_size));
625 return cmp == 0 ? a_size < b_size : cmp < 0;
626}
627
628struct String : public Vector<char> {
629 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