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

Function string_remove_suffix

subprojects/llama.cpp/common/common.cpp:463–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461}
462
463bool string_remove_suffix(std::string & str, const std::string_view & suffix) {
464 bool has_suffix = string_ends_with(str, suffix);
465 if (has_suffix) {
466 str = str.substr(0, str.size() - suffix.size());
467 }
468 return has_suffix;
469}
470
471size_t string_find_partial_stop(const std::string_view & str, const std::string_view & stop) {
472 if (!str.empty() && !stop.empty()) {

Callers 2

load_imatrixFunction · 0.85
load_imatrixMethod · 0.85

Calls 2

string_ends_withFunction · 0.70
sizeMethod · 0.65

Tested by

no test coverage detected