57inline std::basic_string<CharType>
get_option(
const std::basic_string<CharType>& args,
58 const std::basic_string<CharType>& option) {
59 size_t pos = args.find(option + CharType(
'='));
61 if (pos != std::string::npos) {
62 size_t start = pos + option.length() + 1;
63 size_t end = args.find(
' ', start);
64 return args.substr(start, end - start);
67 return std::basic_string<CharType>{};
std::basic_string< CharType > get_option(const std::basic_string< CharType > &args, const std::basic_string< CharType > &option)
Helper function to get the option value from command line arguments.
Definition mkfs.h:57