Does "this" end with "x"
| 90 | |
| 91 | // Does "this" end with "x" |
| 92 | bool StringPiece::ends_with(const StringPiece& x) const { |
| 93 | return ((m_length >= x.m_length) && |
| 94 | (MemoryEqual(m_ptr + m_length - x.m_length, x.m_ptr, x.m_length))); |
| 95 | } |
| 96 | |
| 97 | size_type StringPiece::copy(char* buf, size_type n, size_type pos) const { |
| 98 | size_type ret = std::min(m_length - pos, n); |