- size_t n = std::min(this->size(), that.size());
- int res = memcmp(this->c_str(), that.c_str(), n);
- if (res != 0)
- return res;
- else if (this->size() == that.size())
- return 0;
- else if (this->size() < that.size())
- return -1;
- else
- return 1;
+ return this->size() == len
+ && std::memcmp(this->c_str(), data, len) == 0;