Does "this" start with "x"
| 129 | |
| 130 | // Does "this" start with "x" |
| 131 | bool starts_with(const StringPiece& x) const { |
| 132 | return ((length_ >= x.length_) && |
| 133 | (memcmp(ptr_, x.ptr_, x.length_) == 0)); |
| 134 | } |
| 135 | |
| 136 | // Does "this" end with "x" |
| 137 | bool ends_with(const StringPiece& x) const { |