MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / has_arg

Function has_arg

app/server/main.cpp:35–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33std::optional<std::string> arg_value(int argc, char ** argv, const std::string & name) {
34 for (int i = 1; i + 1 < argc; ++i) {
35 if (argv[i] == name) {
36 return std::string(argv[i + 1]);
37 }
38 }
39 return std::nullopt;
40}
41
42bool has_arg(int argc, char ** argv, const std::string & name) {
43 for (int i = 1; i < argc; ++i) {
44 if (argv[i] == name) {
45 return true;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected