Buffer
| 4438 | |
| 4439 | // Buffer |
| 4440 | bool start_with(const std::string &a, size_t spos, size_t epos, |
| 4441 | const std::string &b) const { |
| 4442 | if (epos - spos < b.size()) { return false; } |
| 4443 | for (size_t i = 0; i < b.size(); i++) { |
| 4444 | if (a[i + spos] != b[i]) { return false; } |
| 4445 | } |
| 4446 | return true; |
| 4447 | } |
| 4448 | |
| 4449 | size_t buf_size() const { return buf_epos_ - buf_spos_; } |
| 4450 |