MCPcopy Create free account
hub / github.com/LBANN/lbann / token_match

Function token_match

src/utils/argument_parser.cpp:44–47  ·  view source on GitHub ↗

@brief Check a raw argument for a given token. * * Returns "true" when EITHER: * * - testtoken == rawargument is true. * - rawargument has an equals sign and the substring up to (but not * including) the equals sign compares equal to testtoken. */

Source from the content-addressed store, hash-verified

42 * including) the equals sign compares equal to testtoken.
43 */
44bool token_match(std::string const& testtoken, std::string const& rawargument)
45{
46 return (rawargument.compare(0, rawargument.find('='), testtoken) == 0);
47}
48} // namespace
49
50namespace lbann {

Callers 1

handle_errorMethod · 0.85

Calls 1

compareMethod · 0.45

Tested by

no test coverage detected