MCPcopy Create free account
hub / github.com/AlexInLog/ReactivePlusPlus / find_argument

Function find_argument

src/benchmarks/benchmarks.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46std::optional<std::string_view> find_argument(std::string_view target_argument, std::span<char*> args)
47{
48 for (const auto raw_argument : args)
49 {
50 const auto argument = std::string_view{raw_argument};
51 if (argument.starts_with(target_argument))
52 {
53 return argument.substr(target_argument.size());
54 }
55 }
56 return std::nullopt;
57}
58
59namespace rpp
60{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected