Go to the documentation of this file.
53 : ptr_(
x.ptr_ + pos), length_(
x.length_ - pos) {
61 : ptr_(
x.ptr_ + pos), length_(
std::min(
len,
x.length_ - pos)) {
106 if (
length_ == 0 && pos == 0 &&
s.length_ == 0)
return 0;
110 s.ptr_,
s.ptr_ +
s.length_);
118 const char* result =
static_cast<const char*
>(
120 return result !=
nullptr ? result -
ptr_ :
npos;
126 if (
s.length_ == 0)
return std::min(ulen, pos);
128 const char* last =
ptr_ + std::min(ulen -
s.length_, pos) +
s.length_;
129 const char* result = std::find_end(
ptr_, last,
s.ptr_,
s.ptr_ +
s.length_);
130 return result != last ? result -
ptr_ :
npos;
158 const char*
const data = characters_wanted.
data();
160 table[
static_cast<unsigned char>(
data[
i])] =
true;
166 if (
length_ <= 0 ||
s.length_ <= 0) {
172 bool lookup[UCHAR_MAX + 1] = {
false };
185 if (
s.length_ <= 0)
return 0;
189 bool lookup[UCHAR_MAX + 1] = {
false };
192 if (!
lookup[
static_cast<unsigned char>(
ptr_[
i])]) {
203 for (; pos < static_cast<size_type>(
length_); ++pos) {
204 if (
ptr_[pos] != c) {
217 bool lookup[UCHAR_MAX + 1] = {
false };
233 if (
s.length_ <= 0)
return i;
238 bool lookup[UCHAR_MAX + 1] = {
false };
240 for (;
i >= 0; --
i) {
241 if (!
lookup[
static_cast<unsigned char>(
ptr_[
i])]) {
bool ConsumeFromEnd(StringPiece x)
static int16_t lookup[CNT]
stringpiece_ssize_type length() const
string::difference_type stringpiece_ssize_type
const char * data() const
GLenum GLuint GLenum GLsizei length
bool ends_with(StringPiece x) const
void CopyToString(string *target) const
stringpiece_ssize_type find_last_of(StringPiece s, size_type pos=npos) const
stringpiece_ssize_type rfind(StringPiece s, size_type pos=npos) const
StringPiece substr(size_type pos, size_type n=npos) const
static const size_type npos
stringpiece_ssize_type find_first_not_of(StringPiece s, size_type pos=0) const
static void BuildLookupTable(StringPiece characters_wanted, bool *table)
#define GOOGLE_LOG(LEVEL)
bool Consume(StringPiece x)
bool starts_with(StringPiece x) const
std::ostream & operator<<(std::ostream &o, const uint128 &b)
GLenum GLuint GLenum GLsizei const GLchar * buf
stringpiece_ssize_type length_
stringpiece_ssize_type copy(char *buf, size_type n, size_type pos=0) const
stringpiece_ssize_type find_first_of(StringPiece s, size_type pos=0) const
stringpiece_ssize_type find_last_not_of(StringPiece s, size_type pos=npos) const
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
stringpiece_ssize_type find(StringPiece s, size_type pos=0) const
stringpiece_ssize_type size() const
bool contains(StringPiece s) const
void AppendToString(string *target) const
static void LogFatalSizeTooBig(size_t size, const char *details)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:59