Go to the documentation of this file.
15 #include "absl/strings/string_view.h"
17 #ifndef ABSL_USES_STD_STRING_VIEW
24 #include "absl/strings/internal/memutil.h"
32 memset(fill_buf,
o.fill(),
sizeof(fill_buf));
47 for (
char c : wanted) {
54 static unsigned char Index(
char c) {
return static_cast<unsigned char>(c); }
61 std::ostream::sentry sentry(
o);
65 if (
static_cast<size_t>(
o.width()) > piece.
size()) {
66 size_t pad =
o.width() - piece.
size();
67 if ((
o.flags() &
o.adjustfield) ==
o.left) {
84 if (
empty() &&
pos == 0 &&
s.empty())
return 0;
97 static_cast<const char*
>(memchr(
ptr_ +
pos, c, length_ -
pos));
103 if (length_ <
s.length_)
return npos;
106 const char*
result = std::find_end(
ptr_, last,
s.ptr_,
s.ptr_ +
s.length_);
114 if (
empty())
return npos;
126 if (
empty() ||
s.empty()) {
130 if (
s.length_ == 1)
return find_first_of(
s.ptr_[0],
pos);
142 if (
empty())
return npos;
144 if (
s.length_ == 1)
return find_first_not_of(
s.ptr_[0],
pos);
156 if (
empty())
return npos;
157 for (;
pos < length_; ++
pos) {
167 if (
empty() ||
s.empty())
return npos;
169 if (
s.length_ == 1)
return find_last_of(
s.ptr_[0],
pos);
182 if (
empty())
return npos;
184 if (
s.empty())
return i;
186 if (
s.length_ == 1)
return find_last_not_of(
s.ptr_[0],
pos);
199 if (
empty())
return npos;
211 #ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
219 #endif // ABSL_USES_STD_STRING_VIEW
return memset(p, 0, total)
ABSL_NAMESPACE_BEGIN std::ostream & operator<<(std::ostream &os, absl::LogSeverity s)
size_type find(string_view s, size_type pos=0) const noexcept
#define ABSL_NAMESPACE_END
size_type find_first_of(string_view s, size_type pos=0) const noexcept
static constexpr size_type kMaxSize
LookupTable(string_view wanted)
#define ABSL_NAMESPACE_BEGIN
constexpr size_type size() const noexcept
void WritePadding(std::ostream &o, size_t pad)
bool operator[](char c) const
size_type find_first_not_of(string_view s, size_type pos=0) const noexcept
size_type rfind(string_view s, size_type pos=npos) const noexcept
size_type find_last_of(string_view s, size_type pos=npos) const noexcept
const char * memmatch(const char *phaystack, size_t haylen, const char *pneedle, size_t neelen)
static unsigned char Index(char c)
static PyObject * Index(PyContainer *self, PyObject *item)
static constexpr size_type npos
constexpr const_pointer data() const noexcept
size_type find_last_not_of(string_view s, size_type pos=npos) const noexcept
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:21