MCPcopy Create free account
hub / github.com/catboost/catboost / String

Class String

contrib/libs/flatbuffers/include/flatbuffers/string.h:25–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace flatbuffers {
24
25struct String : public Vector<char> {
26 const char *c_str() const { return reinterpret_cast<const char *>(Data()); }
27 std::string str() const { return std::string(c_str(), size()); }
28
29 // clang-format off
30 #ifdef FLATBUFFERS_HAS_STRING_VIEW
31 flatbuffers::string_view string_view() const {
32 return flatbuffers::string_view(c_str(), size());
33 }
34
35 /* implicit */
36 operator flatbuffers::string_view() const {
37 return flatbuffers::string_view(c_str(), size());
38 }
39 #endif // FLATBUFFERS_HAS_STRING_VIEW
40 // clang-format on
41
42 bool operator<(const String &o) const {
43 return StringLessThan(this->data(), this->size(), o.data(), o.size());
44 }
45};
46
47// Convenience function to get std::string from a String returning an empty
48// string on null pointer.

Callers 9

StringMethod · 0.50
AlterMethod · 0.50
CharacterMethod · 0.50
LexMethod · 0.50
AlterMethod · 0.50
AlterMethod · 0.50
gtest-string.hFile · 0.50
EncodeStringMethod · 0.50
EncodeStringMethod · 0.50

Calls 3

string_viewFunction · 0.85
c_strFunction · 0.50
sizeFunction · 0.50

Tested by

no test coverage detected