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

Method AsString

native/thirdpart/flatbuffers/flexbuffers.h:521–531  ·  view source on GitHub ↗

This function returns the empty string if you try to read something that is not a string or key.

Source from the content-addressed store, hash-verified

519 // This function returns the empty string if you try to read something that
520 // is not a string or key.
521 String AsString() const {
522 if (type_ == FBT_STRING) {
523 return String(Indirect(), byte_width_);
524 } else if (type_ == FBT_KEY) {
525 auto key = Indirect();
526 return String(key, byte_width_,
527 strlen(reinterpret_cast<const char *>(key)));
528 } else {
529 return String::EmptyString();
530 }
531 }
532
533 // Unlike AsString(), this will convert any type to a std::string.
534 std::string ToString() const {

Callers

nothing calls this directly

Calls 2

IndirectFunction · 0.85
StringFunction · 0.70

Tested by

no test coverage detected