webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Types | Public Member Functions | Static Public Attributes | List of all members
google::protobuf::StringPiece Class Reference

#include <stringpiece.h>

Public Types

typedef char value_type
 
typedef const char * pointer
 
typedef const char & reference
 
typedef const char & const_reference
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef const char * const_iterator
 
typedef const char * iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef std::reverse_iterator< iteratorreverse_iterator
 

Public Member Functions

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

Static Public Attributes

static const size_type npos = size_type(-1)
 

Member Typedef Documentation

◆ const_iterator

◆ const_reference

◆ const_reverse_iterator

◆ difference_type

◆ iterator

◆ pointer

◆ reference

◆ reverse_iterator

◆ size_type

◆ value_type

Constructor & Destructor Documentation

◆ StringPiece() [1/6]

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

◆ StringPiece() [2/6]

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

◆ StringPiece() [3/6]

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

◆ StringPiece() [4/6]

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

◆ StringPiece() [5/6]

StringPiece::StringPiece ( StringPiece  x,
stringpiece_ssize_type  pos 
)

◆ StringPiece() [6/6]

StringPiece::StringPiece ( StringPiece  x,
stringpiece_ssize_type  pos,
stringpiece_ssize_type  len 
)

Member Function Documentation

◆ AppendToString()

void StringPiece::AppendToString ( string target) const

◆ as_string()

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

◆ begin()

iterator google::protobuf::StringPiece::begin ( ) const
inline

◆ capacity()

stringpiece_ssize_type google::protobuf::StringPiece::capacity ( ) const
inline

◆ clear()

void google::protobuf::StringPiece::clear ( )
inline

◆ compare()

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

◆ Consume()

bool StringPiece::Consume ( StringPiece  x)

◆ ConsumeFromEnd()

bool StringPiece::ConsumeFromEnd ( StringPiece  x)

◆ contains()

bool StringPiece::contains ( StringPiece  s) const

◆ copy()

stringpiece_ssize_type StringPiece::copy ( char *  buf,
size_type  n,
size_type  pos = 0 
) const

◆ CopyToString()

void StringPiece::CopyToString ( string target) const

◆ data()

const char* google::protobuf::StringPiece::data ( ) const
inline

◆ empty()

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

◆ end()

iterator google::protobuf::StringPiece::end ( ) const
inline

◆ ends_with()

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

◆ find() [1/2]

stringpiece_ssize_type StringPiece::find ( StringPiece  s,
size_type  pos = 0 
) const

◆ find() [2/2]

stringpiece_ssize_type StringPiece::find ( char  c,
size_type  pos = 0 
) const

◆ find_first_not_of() [1/2]

stringpiece_ssize_type StringPiece::find_first_not_of ( StringPiece  s,
size_type  pos = 0 
) const

◆ find_first_not_of() [2/2]

stringpiece_ssize_type StringPiece::find_first_not_of ( char  c,
size_type  pos = 0 
) const

◆ find_first_of() [1/2]

stringpiece_ssize_type StringPiece::find_first_of ( StringPiece  s,
size_type  pos = 0 
) const

◆ find_first_of() [2/2]

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

◆ find_last_not_of() [1/2]

stringpiece_ssize_type StringPiece::find_last_not_of ( StringPiece  s,
size_type  pos = npos 
) const

◆ find_last_not_of() [2/2]

stringpiece_ssize_type StringPiece::find_last_not_of ( char  c,
size_type  pos = npos 
) const

◆ find_last_of() [1/2]

stringpiece_ssize_type StringPiece::find_last_of ( StringPiece  s,
size_type  pos = npos 
) const

◆ find_last_of() [2/2]

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

◆ length()

stringpiece_ssize_type google::protobuf::StringPiece::length ( void  ) const
inline

◆ max_size()

stringpiece_ssize_type google::protobuf::StringPiece::max_size ( ) const
inline

◆ operator string()

google::protobuf::StringPiece::operator string ( ) const
inline

◆ operator[]()

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

◆ rbegin()

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

◆ remove_prefix()

void google::protobuf::StringPiece::remove_prefix ( stringpiece_ssize_type  n)
inline

◆ remove_suffix()

void google::protobuf::StringPiece::remove_suffix ( stringpiece_ssize_type  n)
inline

◆ rend()

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

◆ rfind() [1/2]

stringpiece_ssize_type StringPiece::rfind ( StringPiece  s,
size_type  pos = npos 
) const

◆ rfind() [2/2]

stringpiece_ssize_type StringPiece::rfind ( char  c,
size_type  pos = npos 
) const

◆ set() [1/3]

void google::protobuf::StringPiece::set ( const char *  data,
stringpiece_ssize_type  len 
)
inline

◆ set() [2/3]

void google::protobuf::StringPiece::set ( const char *  str)
inline

◆ set() [3/3]

void google::protobuf::StringPiece::set ( const void data,
stringpiece_ssize_type  len 
)
inline

◆ size()

stringpiece_ssize_type google::protobuf::StringPiece::size ( ) const
inline

◆ starts_with()

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

◆ substr()

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

◆ ToString()

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

Member Data Documentation

◆ npos

const StringPiece::size_type StringPiece::npos = size_type(-1)
static

The documentation for this class was generated from the following files: