| 174 | }; |
| 175 | |
| 176 | inline bool operator==(const StringPiece& x, const StringPiece& y) { |
| 177 | StringPiece::size_type len = x.size(); |
| 178 | if (len != y.size()) return false; |
| 179 | return x.data() == y.data() || len == 0 || |
| 180 | memcmp(x.data(), y.data(), len) == 0; |
| 181 | } |
| 182 | |
| 183 | inline bool operator!=(const StringPiece& x, const StringPiece& y) { |
| 184 | return !(x == y); |
no test coverage detected