Home | History | Annotate | Download | only in kati

Lines Matching defs:StringPiece

18 // Copied from strings/stringpiece.h with modifications
22 // Functions or methods may use const StringPiece& parameters to accept either
24 // a StringPiece. The implicit conversion means that it is often appropriate
26 // StringPiece as would be appropriate for most other Google classes.
28 // Systematic usage of StringPiece is encouraged as it will reduce unnecessary
44 class StringPiece {
62 // in a "const char*" or a "string" wherever a "StringPiece" is
64 StringPiece() : ptr_(NULL), length_(0) { }
65 StringPiece(const char* str)
67 StringPiece(const std::string& str)
69 StringPiece(const std::string&& str)
71 StringPiece(const char* offset, size_type len)
111 int compare(const StringPiece& x) const {
130 bool starts_with(const StringPiece& x) const {
136 bool ends_with(const StringPiece& x) const {
155 size_type find(const StringPiece& s, size_type pos = 0) const;
157 size_type rfind(const StringPiece& s, size_type pos = npos) const;
160 size_type find_first_of(const StringPiece& s, size_type pos = 0) const;
164 size_type find_first_not_of(const StringPiece& s, size_type pos = 0) const;
166 size_type find_last_of(const StringPiece& s, size_type pos = npos) const;
170 size_type find_last_not_of(const StringPiece& s, size_type pos = npos) const;
173 StringPiece substr(size_type pos, size_type n = npos) const;
188 bool operator==(const StringPiece& x, const StringPiece& y);
190 inline bool operator!=(const StringPiece& x, const StringPiece& y) {
194 inline bool operator<(const StringPiece& x, const StringPiece& y) {
195 const int r = StringPiece::wordmemcmp(
200 inline bool operator>(const StringPiece& x, const StringPiece& y) {
204 inline bool operator<=(const StringPiece& x, const StringPiece& y) {
208 inline bool operator>=(const StringPiece& x, const StringPiece& y) {
213 template<> struct hash<StringPiece> {
214 size_t operator()(const StringPiece& s) const {