class StringPiece

Defined at line 39 of file ../../third_party/re2/src/re2/stringpiece.h

Public Members

static const size_type npos

Public Methods

void StringPiece ()

We provide non-explicit singleton constructors so users can pass

in a "const char*" or a "string" wherever a "StringPiece" is

expected.

Defined at line 58 of file ../../third_party/re2/src/re2/stringpiece.h

void StringPiece (const std::string_view & str)

Defined at line 61 of file ../../third_party/re2/src/re2/stringpiece.h

void StringPiece (const std::string & str)

Defined at line 64 of file ../../third_party/re2/src/re2/stringpiece.h

void StringPiece (const char * str)

Defined at line 66 of file ../../third_party/re2/src/re2/stringpiece.h

void StringPiece (const char * str, size_type len)

Defined at line 68 of file ../../third_party/re2/src/re2/stringpiece.h

const_iterator begin ()

Defined at line 71 of file ../../third_party/re2/src/re2/stringpiece.h

const_iterator end ()

Defined at line 72 of file ../../third_party/re2/src/re2/stringpiece.h

const_reverse_iterator rbegin ()

Defined at line 73 of file ../../third_party/re2/src/re2/stringpiece.h

const_reverse_iterator rend ()

Defined at line 76 of file ../../third_party/re2/src/re2/stringpiece.h

size_type length ()

Defined at line 81 of file ../../third_party/re2/src/re2/stringpiece.h

bool empty ()

Defined at line 82 of file ../../third_party/re2/src/re2/stringpiece.h

const_reference operator[] (size_type i)

Defined at line 84 of file ../../third_party/re2/src/re2/stringpiece.h

const_pointer data ()

Defined at line 85 of file ../../third_party/re2/src/re2/stringpiece.h

void remove_prefix (size_type n)

Defined at line 87 of file ../../third_party/re2/src/re2/stringpiece.h

void remove_suffix (size_type n)

Defined at line 92 of file ../../third_party/re2/src/re2/stringpiece.h

void AppendToString (std::string * target)

Defined at line 130 of file ../../third_party/re2/src/re2/stringpiece.h

int compare (const StringPiece & x)

Defined at line 137 of file ../../third_party/re2/src/re2/stringpiece.h

size_type copy (char * buf, size_type n, size_type pos)
template <typename A>
std::basic_string<char, traits_type, A> operator std::basic_string<char, std::char_traits<char>, type-parameter-0-0> ()

Converts to `std::basic_string`.

Defined at line 108 of file ../../third_party/re2/src/re2/stringpiece.h

std::string as_string ()

Defined at line 113 of file ../../third_party/re2/src/re2/stringpiece.h

std::string ToString ()

We also define ToString() here, since many other string-like

interfaces name the routine that converts to a C++ string

"ToString", and it's confusing to have the method that does that

for a StringPiece be called "as_string()". We also leave the

"as_string()" method defined here for existing code.

Defined at line 122 of file ../../third_party/re2/src/re2/stringpiece.h

void CopyToString (std::string * target)

Defined at line 126 of file ../../third_party/re2/src/re2/stringpiece.h

bool ends_with (const StringPiece & x)

Does "this" end with "x"?

Defined at line 156 of file ../../third_party/re2/src/re2/stringpiece.h

bool contains (const StringPiece & s)

Defined at line 162 of file ../../third_party/re2/src/re2/stringpiece.h

StringPiece substr (size_type pos, size_type n)
size_type find (const StringPiece & s, size_type pos)
size_type find (char c, size_type pos)
size_type rfind (const StringPiece & s, size_type pos)
size_type rfind (char c, size_type pos)
size_type size ()

Defined at line 80 of file ../../third_party/re2/src/re2/stringpiece.h

void set (const char * str)

Defined at line 96 of file ../../third_party/re2/src/re2/stringpiece.h

void set (const char * str, size_type len)

Defined at line 101 of file ../../third_party/re2/src/re2/stringpiece.h

bool starts_with (const StringPiece & x)

Does "this" start with "x"?

Defined at line 150 of file ../../third_party/re2/src/re2/stringpiece.h