MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / string_ends_with

Function string_ends_with

smallthinker/common/common.cpp:448–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448bool string_ends_with(const std::string_view & str, const std::string_view & suffix) {
449 return str.size() >= suffix.size() && str.compare(str.size()-suffix.size(), suffix.size(), suffix) == 0;
450}
451size_t string_find_partial_stop(const std::string_view & str, const std::string_view & stop) {
452 if (!str.empty() && !stop.empty()) {
453 const char text_last_char = str.back();

Callers 7

string_find_partial_stopFunction · 0.70
applyFunction · 0.70
mainFunction · 0.50

Calls 2

sizeMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected