Last active
October 20, 2021 19:19
-
-
Save mostsignificant/0ac6f8435329d01d03e1fc8715c6335c to your computer and use it in GitHub Desktop.
blog-has-option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool has_option( | |
const std::vector<std::string_view>& args, | |
const std::string_view& option_name) { | |
for (auto it = args.begin(), end = args.end(); it != end; ++it) { | |
if (*it == option_name) | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment