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

Class String

native/thirdpart/flatbuffers/flexbuffers.h:236–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234};
235
236class String : public Sized {
237 public:
238 // Size prefix.
239 String(const uint8_t *data, uint8_t byte_width) : Sized(data, byte_width) {}
240 // Manual size.
241 String(const uint8_t *data, uint8_t byte_width, size_t sz)
242 : Sized(data, byte_width, sz) {}
243
244 size_t length() const { return size(); }
245 const char *c_str() const { return reinterpret_cast<const char *>(data_); }
246 std::string str() const { return std::string(c_str(), size()); }
247
248 static String EmptyString() {
249 static const char *empty_string = "";
250 return String(reinterpret_cast<const uint8_t *>(empty_string), 1, 0);
251 }
252 bool IsTheEmptyString() const { return data_ == EmptyString().data_; }
253};
254
255class Blob : public Sized {
256 public:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected