| 185 | } |
| 186 | |
| 187 | std::string MetadataTagProcessorImpl::ValidateAndFormat_destination(std::string const & v) |
| 188 | { |
| 189 | // Normalization. "a1 a2;b1-b2; c,d ;e,;f; ;g" -> "a1 a2; b1-b2; c; d; e; f; g" |
| 190 | std::string r; |
| 191 | strings::Tokenize(v, ";,", [&](std::string_view d) |
| 192 | { |
| 193 | strings::Trim(d); |
| 194 | if (d.empty()) |
| 195 | return; |
| 196 | if (!r.empty()) |
| 197 | r += "; "; |
| 198 | r.append(d); |
| 199 | }); |
| 200 | return r; |
| 201 | } |
| 202 | |
| 203 | std::string MetadataTagProcessorImpl::ValidateAndFormat_destination_ref(std::string const & v) |
| 204 | { |