MCPcopy Create free account
hub / github.com/PABannier/bark.cpp / start_with

Method start_with

examples/server/httplib.h:4440–4447  ·  view source on GitHub ↗

Buffer

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected