| 127 | }; |
| 128 | |
| 129 | swoc::Rv<swoc::TextView> |
| 130 | parse_arg(TextView &key) |
| 131 | { |
| 132 | TextView arg{key}; |
| 133 | TextView name{arg.take_prefix_at(ARG_PREFIX)}; |
| 134 | if (name.size() == key.size()) { // no arg prefix, it's just the name. |
| 135 | return {}; |
| 136 | } |
| 137 | if (arg.empty() || arg.back() != ARG_SUFFIX) { |
| 138 | return Errata(S_ERROR, R"(Argument for "{}" is not properly terminated with '{}'.)", name, ARG_SUFFIX); |
| 139 | } |
| 140 | key = name; |
| 141 | return arg.remove_suffix(1); |
| 142 | } |
| 143 | |
| 144 | /* ------------------------------------------------------------------------------------ */ |
| 145 | Config::Config() : _arena(_cfg_storage_required + 2048) |
no test coverage detected