Home | History | Annotate | Download | only in strings

Lines Matching defs:StringPiece

4 // Copied from strings/stringpiece.h with modifications
8 // You can use StringPiece as a function or method parameter. A StringPiece
10 // char*" argument, a string argument, or a StringPiece argument with no data
11 // copying. Systematic use of StringPiece for arguments reduces data
15 // void MyFunction(StringPiece arg);
17 // void MyFunction(const StringPiece& arg); // not preferred
36 typedef BasicStringPiece<std::string> StringPiece;
40 // Many of the StringPiece functions use different implementations for the
44 // So here we define overloaded functions called by the StringPiece template.
49 void CopyToString(const StringPiece& self, std::string* target);
51 void AppendToString(const StringPiece& self, std::string* target);
53 size_t copy(const StringPiece& self, char* buf, size_t n, size_t pos);
55 size_t find(const StringPiece& self, const StringPiece& s, size_t pos);
56 size_t find(const StringPiece& self, char c, size_t pos);
58 size_t rfind(const StringPiece& self, const StringPiece& s, size_t pos);
59 size_t rfind(const StringPiece& self, char c, size_t pos);
61 size_t find_first_of(const StringPiece& self, const StringPiece& s, size_t pos);
63 size_t find_first_not_of(const StringPiece& self,
64 const StringPiece& s,
66 size_t find_first_not_of(const StringPiece& self, char c, size_t pos);
68 size_t find_last_of(const StringPiece& self, const StringPiece& s, size_t pos);
69 size_t find_last_of(const StringPiece& self, char c, size_t pos);
71 size_t find_last_not_of(const StringPiece& self,
72 const StringPiece& s,
74 size_t find_last_not_of(const StringPiece& self, char c, size_t pos);
76 StringPiece substr(const StringPiece& self, size_t pos, size_t n);
83 // StringPiece and StringPiece16. Do not refer to this class directly, but
84 // rather to BasicStringPiece, StringPiece, or StringPiece16.
104 // in a "const char*" or a "string" wherever a "StringPiece" is
295 BASE_EXPORT bool operator==(const StringPiece& x, const StringPiece& y);
297 inline bool operator!=(const StringPiece& x, const StringPiece& y) {
301 inline bool operator<(const StringPiece& x, const StringPiece& y) {
302 const int r = StringPiece::wordmemcmp(
307 inline bool operator>(const StringPiece& x, const StringPiece& y) {
311 inline bool operator<=(const StringPiece& x, const StringPiece& y) {
315 inline bool operator>=(const StringPiece& x, const StringPiece& y) {
319 std::ostream& operator<<(std::ostream& o, const StringPiece& piece);