MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / StringPiece

Method StringPiece

Bcore/src/main/cpp/base/stringpiece.h:52–52  ·  view source on GitHub ↗

We provide non-explicit singleton constructors so users can pass in a "const char*" or a "string" wherever a "StringPiece" is expected.

Source from the content-addressed store, hash-verified

50 // in a "const char*" or a "string" wherever a "StringPiece" is
51 // expected.
52 StringPiece() : ptr_(nullptr), length_(0) { }
53 StringPiece(const char* str) // NOLINT implicit constructor desired
54 : ptr_(str), length_((str == nullptr) ? 0 : strlen(str)) { }
55 StringPiece(const std::string& str) // NOLINT implicit constructor desired

Callers

nothing calls this directly

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected