MCPcopy Create free account
hub / github.com/esmBot/esmBot / ends_with

Function ends_with

natives/cli/cli.cc:12–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include <vector>
11
12static bool ends_with(std::string_view str, std::string_view suffix) {
13 return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
14}
15
16static bool starts_with(std::string_view str, std::string_view prefix) {
17 return str.size() >= prefix.size() && str.compare(0, prefix.size(), prefix) == 0;

Callers 1

parseArgumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected