Lines Matching refs:x
104 int compare(const StringPiece& x) const;
122 bool starts_with(const StringPiece& x) const { in starts_with() argument
123 return ((length_ >= x.length_) && in starts_with()
124 (memcmp(ptr_, x.ptr_, x.length_) == 0)); in starts_with()
128 bool ends_with(const StringPiece& x) const { in ends_with() argument
129 return ((length_ >= x.length_) && in ends_with()
130 (memcmp(ptr_ + (length_-x.length_), x.ptr_, x.length_) == 0)); in ends_with()
161 inline bool operator==(const StringPiece& x, const StringPiece& y) {
162 StringPiece::size_type len = x.size();
167 const char* p1 = x.data();
187 inline bool operator==(const StringPiece& x, const char* y) {
189 return x.size() == 0;
191 return strncmp(x.data(), y, x.size()) == 0 && y[x.size()] == '\0';
195 inline bool operator!=(const StringPiece& x, const StringPiece& y) {
196 return !(x == y);
199 inline bool operator!=(const StringPiece& x, const char* y) {
200 return !(x == y);
203 inline bool operator<(const StringPiece& x, const StringPiece& y) {
204 const int r = memcmp(x.data(), y.data(),
205 std::min(x.size(), y.size()));
206 return ((r < 0) || ((r == 0) && (x.size() < y.size())));
209 inline bool operator>(const StringPiece& x, const StringPiece& y) {
210 return y < x;
213 inline bool operator<=(const StringPiece& x, const StringPiece& y) {
214 return !(x > y);
217 inline bool operator>=(const StringPiece& x, const StringPiece& y) {
218 return !(x < y);