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

Method substr

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

Source from the content-addressed store, hash-verified

193 }
194
195 StringPiece substr(size_type pos, size_type n = npos) const {
196 if (pos > static_cast<size_type>(length_)) pos = length_;
197 if (n > length_ - pos) n = length_ - pos;
198 return StringPiece(ptr_ + pos, n);
199 }
200
201 int Compare(const StringPiece& rhs) const {
202 const int r = memcmp(data(), rhs.data(), std::min(size(), rhs.size()));

Callers

nothing calls this directly

Calls 1

StringPieceClass · 0.70

Tested by

no test coverage detected