Public Types | Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
google::protobuf::stringpiece_internal::StringPiece Class Reference

#include <stringpiece.h>

Public Types

using const_iterator = const char *
 
using const_pointer = const char *
 
using const_reference = const char &
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using difference_type = std::ptrdiff_t
 
using iterator = const_iterator
 
using pointer = char *
 
using reference = char &
 
using reverse_iterator = const_reverse_iterator
 
using size_type = size_t
 
using traits_type = std::char_traits< char >
 
using value_type = char
 

Public Member Functions

void AppendToString (std::string *target) const
 
std::string as_string () const
 
const_iterator begin () const
 
size_type capacity () const
 
int compare (StringPiece x) const
 
bool Consume (StringPiece x)
 
bool ConsumeFromEnd (StringPiece x)
 
bool contains (StringPiece s) const
 
size_type copy (char *buf, size_type n, size_type pos=0) const
 
void CopyToString (std::string *target) const
 
const_pointer data () const
 
bool empty () const
 
const_iterator end () const
 
bool ends_with (StringPiece x) const
 
size_type find (char c, size_type pos=0) const
 
size_type find (StringPiece s, size_type pos=0) const
 
size_type find_first_not_of (char c, size_type pos=0) const
 
size_type find_first_not_of (StringPiece s, size_type pos=0) const
 
size_type find_first_of (char c, size_type pos=0) const
 
size_type find_first_of (StringPiece s, size_type pos=0) const
 
size_type find_last_not_of (char c, size_type pos=npos) const
 
size_type find_last_not_of (StringPiece s, size_type pos=npos) const
 
size_type find_last_of (char c, size_type pos=npos) const
 
size_type find_last_of (StringPiece s, size_type pos=npos) const
 
size_type length () const
 
size_type max_size () const
 
 operator std::string () const
 
char operator[] (size_type i) const
 
const_reverse_iterator rbegin () const
 
void remove_prefix (size_type n)
 
void remove_suffix (size_type n)
 
const_reverse_iterator rend () const
 
size_type rfind (char c, size_type pos=npos) const
 
size_type rfind (StringPiece s, size_type pos=npos) const
 
size_type size () const
 
bool starts_with (StringPiece x) const
 
 StringPiece ()
 
 StringPiece (const char *offset, size_type len)
 
 StringPiece (const char *str)
 
template<class Allocator >
 StringPiece (const std::basic_string< char, std::char_traits< char >, Allocator > &str)
 
StringPiece substr (size_type pos, size_type n=npos) const
 
std::string ToString () const
 

Static Public Attributes

static const size_type npos = size_type(-1)
 

Static Private Member Functions

static size_type CheckSize (size_type size)
 
static void LogFatalSizeTooBig (size_type size, const char *details)
 

Private Attributes

size_type length_
 
const char * ptr_
 

Static Private Attributes

static constexpr size_type kMaxSize
 

Detailed Description

Definition at line 163 of file protobuf/src/google/protobuf/stubs/stringpiece.h.

Member Typedef Documentation

◆ const_iterator

◆ const_pointer

◆ const_reference

◆ const_reverse_iterator

◆ difference_type

◆ iterator

◆ pointer

◆ reference

◆ reverse_iterator

◆ size_type

◆ traits_type

◆ value_type

Constructor & Destructor Documentation

◆ StringPiece() [1/4]

google::protobuf::stringpiece_internal::StringPiece::StringPiece ( )
inline

◆ StringPiece() [2/4]

google::protobuf::stringpiece_internal::StringPiece::StringPiece ( const char *  str)
inline

◆ StringPiece() [3/4]

template<class Allocator >
google::protobuf::stringpiece_internal::StringPiece::StringPiece ( const std::basic_string< char, std::char_traits< char >, Allocator > &  str)
inline

◆ StringPiece() [4/4]

google::protobuf::stringpiece_internal::StringPiece::StringPiece ( const char *  offset,
size_type  len 
)
inline

Member Function Documentation

◆ AppendToString()

void google::protobuf::stringpiece_internal::StringPiece::AppendToString ( std::string *  target) const

◆ as_string()

std::string google::protobuf::stringpiece_internal::StringPiece::as_string ( ) const
inline

◆ begin()

const_iterator google::protobuf::stringpiece_internal::StringPiece::begin ( ) const
inline

◆ capacity()

size_type google::protobuf::stringpiece_internal::StringPiece::capacity ( ) const
inline

◆ CheckSize()

static size_type google::protobuf::stringpiece_internal::StringPiece::CheckSize ( size_type  size)
inlinestaticprivate

◆ compare()

int google::protobuf::stringpiece_internal::StringPiece::compare ( StringPiece  x) const
inline

◆ Consume()

bool google::protobuf::stringpiece_internal::StringPiece::Consume ( StringPiece  x)

◆ ConsumeFromEnd()

bool google::protobuf::stringpiece_internal::StringPiece::ConsumeFromEnd ( StringPiece  x)

◆ contains()

bool google::protobuf::stringpiece_internal::StringPiece::contains ( StringPiece  s) const

◆ copy()

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::copy ( char *  buf,
size_type  n,
size_type  pos = 0 
) const

◆ CopyToString()

void google::protobuf::stringpiece_internal::StringPiece::CopyToString ( std::string *  target) const

◆ data()

const_pointer google::protobuf::stringpiece_internal::StringPiece::data ( ) const
inline

◆ empty()

bool google::protobuf::stringpiece_internal::StringPiece::empty ( ) const
inline

◆ end()

const_iterator google::protobuf::stringpiece_internal::StringPiece::end ( ) const
inline

◆ ends_with()

bool google::protobuf::stringpiece_internal::StringPiece::ends_with ( StringPiece  x) const
inline

◆ find() [1/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::find ( char  c,
size_type  pos = 0 
) const

◆ find() [2/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::find ( StringPiece  s,
size_type  pos = 0 
) const

◆ find_first_not_of() [1/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::find_first_not_of ( char  c,
size_type  pos = 0 
) const

◆ find_first_not_of() [2/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::find_first_not_of ( StringPiece  s,
size_type  pos = 0 
) const

◆ find_first_of() [1/2]

size_type google::protobuf::stringpiece_internal::StringPiece::find_first_of ( char  c,
size_type  pos = 0 
) const
inline

◆ find_first_of() [2/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::find_first_of ( StringPiece  s,
size_type  pos = 0 
) const

◆ find_last_not_of() [1/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::find_last_not_of ( char  c,
size_type  pos = npos 
) const

◆ find_last_not_of() [2/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::find_last_not_of ( StringPiece  s,
size_type  pos = npos 
) const

◆ find_last_of() [1/2]

size_type google::protobuf::stringpiece_internal::StringPiece::find_last_of ( char  c,
size_type  pos = npos 
) const
inline

◆ find_last_of() [2/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::find_last_of ( StringPiece  s,
size_type  pos = npos 
) const

◆ length()

size_type google::protobuf::stringpiece_internal::StringPiece::length ( ) const
inline

◆ LogFatalSizeTooBig()

void google::protobuf::stringpiece_internal::StringPiece::LogFatalSizeTooBig ( size_type  size,
const char *  details 
)
staticprivate

◆ max_size()

size_type google::protobuf::stringpiece_internal::StringPiece::max_size ( ) const
inline

◆ operator std::string()

google::protobuf::stringpiece_internal::StringPiece::operator std::string ( ) const
inlineexplicit

◆ operator[]()

char google::protobuf::stringpiece_internal::StringPiece::operator[] ( size_type  i) const
inline

◆ rbegin()

const_reverse_iterator google::protobuf::stringpiece_internal::StringPiece::rbegin ( ) const
inline

◆ remove_prefix()

void google::protobuf::stringpiece_internal::StringPiece::remove_prefix ( size_type  n)
inline

◆ remove_suffix()

void google::protobuf::stringpiece_internal::StringPiece::remove_suffix ( size_type  n)
inline

◆ rend()

const_reverse_iterator google::protobuf::stringpiece_internal::StringPiece::rend ( ) const
inline

◆ rfind() [1/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::rfind ( char  c,
size_type  pos = npos 
) const

◆ rfind() [2/2]

StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::rfind ( StringPiece  s,
size_type  pos = npos 
) const

◆ size()

size_type google::protobuf::stringpiece_internal::StringPiece::size ( ) const
inline

◆ starts_with()

bool google::protobuf::stringpiece_internal::StringPiece::starts_with ( StringPiece  x) const
inline

◆ substr()

StringPiece google::protobuf::stringpiece_internal::StringPiece::substr ( size_type  pos,
size_type  n = npos 
) const

◆ ToString()

std::string google::protobuf::stringpiece_internal::StringPiece::ToString ( ) const
inline

Member Data Documentation

◆ kMaxSize

constexpr size_type google::protobuf::stringpiece_internal::StringPiece::kMaxSize
staticconstexprprivate

◆ length_

size_type google::protobuf::stringpiece_internal::StringPiece::length_
private

◆ npos

const StringPiece::size_type google::protobuf::stringpiece_internal::StringPiece::npos = size_type(-1)
static

◆ ptr_

const char* google::protobuf::stringpiece_internal::StringPiece::ptr_
private

The documentation for this class was generated from the following files:
max
int max
Definition: bloaty/third_party/zlib/examples/enough.c:170


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:28