Go to the documentation of this file.
30 #include <google/protobuf/stubs/stringpiece.h>
38 #include <google/protobuf/stubs/logging.h>
42 namespace stringpiece_internal {
91 if (
length_ == 0 &&
pos == 0 && s.length_ == 0)
return 0;
95 s.ptr_, s.ptr_ + s.length_);
103 const char*
result =
static_cast<const char*
>(
114 const char*
result = std::find_end(
ptr_, last, s.ptr_, s.ptr_ + s.length_);
142 const char*
const data = characters_wanted.
data();
144 table[
static_cast<unsigned char>(
data[
i])] =
true;
150 if (
empty() || s.empty()) {
156 bool lookup[UCHAR_MAX + 1] = {
false };
169 if (s.empty())
return 0;
173 bool lookup[UCHAR_MAX + 1] = {
false };
176 if (!
lookup[
static_cast<unsigned char>(
ptr_[
i])]) {
187 for (; pos < static_cast<size_type>(
length_); ++
pos) {
201 bool lookup[UCHAR_MAX + 1] = {
false };
217 if (s.empty())
return i;
222 bool lookup[UCHAR_MAX + 1] = {
false };
225 if (!
lookup[
static_cast<unsigned char>(
ptr_[
i])]) {
static void LogFatalSizeTooBig(size_type size, const char *details)
bool starts_with(StringPiece x) const
const_pointer data() const
bool Consume(StringPiece x)
static void BuildLookupTable(StringPiece characters_wanted, bool *table)
size_type rfind(StringPiece s, size_type pos=npos) const
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
bool ends_with(StringPiece x) const
size_type find_first_not_of(StringPiece s, size_type pos=0) const
StringPiece substr(size_type pos, size_type n=npos) const
size_type copy(char *buf, size_type n, size_type pos=0) const
void CopyToString(std::string *target) const
size_type find(StringPiece s, size_type pos=0) const
def search(target, ideal_distance, stop_event, maximum_hashes, interesting_hamming_distance=None)
static grpc_slice details
bool contains(StringPiece s) const
std::ostream & operator<<(std::ostream &o, StringPiece piece)
UniquePtr< SSL_SESSION > ret
size_type find_last_of(StringPiece s, size_type pos=npos) const
void AppendToString(std::string *target) const
size_type find_first_of(StringPiece s, size_type pos=0) const
static bool lookup(const upb_table *t, lookupkey_t key, upb_value *v, uint32_t hash, eqlfunc_t *eql)
#define GOOGLE_LOG(LEVEL)
static const size_type npos
size_type find_last_not_of(StringPiece s, size_type pos=npos) const
bool ConsumeFromEnd(StringPiece x)
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:22