MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / string_startswith

Function string_startswith

subprojects/llama.cpp/common/jinja/value.cpp:488–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488static bool string_startswith(const std::string & str, const std::string & prefix) {
489 if (str.length() < prefix.length()) return false;
490 return str.compare(0, prefix.length(), prefix) == 0;
491}
492
493static bool string_endswith(const std::string & str, const std::string & suffix) {
494 if (str.length() < suffix.length()) return false;

Callers 1

value.cppFile · 0.85

Calls 2

lengthMethod · 0.65
compareMethod · 0.45

Tested by

no test coverage detected