MCPcopy Create free account
hub / github.com/chen3feng/toft / StringPiece

Method StringPiece

base/string/string_piece.h:80–81  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

78 // in a "const char*" or a "std::string" wherever a "StringPiece" is
79 // expected.
80 StringPiece()
81 : m_ptr(NULL), m_length(0) { }
82 StringPiece(const char* str) // NOLINT(runtime/explicit)
83 : m_ptr(str), m_length(strlen(m_ptr)) { }
84 StringPiece(const unsigned char* str) // NOLINT(runtime/explicit)

Callers

nothing calls this directly

Calls 2

dataMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected