MCPcopy Create free account
hub / github.com/apache/impala / rfind

Method rfind

be/src/gutil/strings/stringpiece.cc:87–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87int StringPiece::rfind(StringPiece s, size_type pos) const {
88 if (length_ < s.length_) return npos;
89 const size_t ulen = length_;
90 if (s.length_ == 0) return min(ulen, pos);
91
92 const char* last = ptr_ + min(ulen - s.length_, pos) + s.length_;
93 const char* result = std::find_end(ptr_, last, s.ptr_, s.ptr_ + s.length_);
94 return result != last ? result - ptr_ : npos;
95}
96
97// Search range is [0..pos] inclusive. If pos == npos, search everything.
98int StringPiece::rfind(char c, size_type pos) const {

Callers 15

process_request_id_pyMethod · 0.80
ParseStatFunction · 0.80
LocalZoneNameMethod · 0.80
OpenSessionMethod · 0.80
GetParentDirNameFunction · 0.80
GetFileNameFunction · 0.80
StrStartsWithFunction · 0.80

Calls 1

minFunction · 0.85

Tested by 5

process_request_id_pyMethod · 0.64
tokenMethod · 0.64
auth_mechMethod · 0.64
TESTFunction · 0.64