MCPcopy Create free account
hub / github.com/docopt/docopt.cpp / starts_with

Function starts_with

docopt_util.h:28–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27namespace {
28 bool starts_with(std::string const& str, std::string const& prefix)
29 {
30 if (str.length() < prefix.length())
31 return false;
32 return std::equal(prefix.begin(), prefix.end(),
33 str.begin());
34 }
35
36 std::string trim(std::string&& str,
37 const std::string& whitespace = " \t\n")

Callers 5

parse_longFunction · 0.85
parse_shortFunction · 0.85
parse_atomFunction · 0.85
parse_argvFunction · 0.85
parse_defaultsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected