| 102 | } |
| 103 | |
| 104 | std::vector<std::string> MetadataWalker::getIdentifiers(const std::string &text) const { |
| 105 | auto pos = text.find("%{"); |
| 106 | std::vector<std::string> found_strings; |
| 107 | while (pos != std::string::npos) { |
| 108 | auto next_pos = text.find("}", pos); |
| 109 | if (next_pos != std::string::npos) { |
| 110 | auto potential_identifier = text.substr(pos + 2, next_pos - (pos + 2)); |
| 111 | std::smatch match; |
| 112 | if (potential_identifier.find("S-") != std::string::npos){ |
| 113 | found_strings.push_back(potential_identifier); |
| 114 | } |
| 115 | } |
| 116 | pos = text.find("%{", pos + 2); |
| 117 | } |
| 118 | return found_strings; |
| 119 | } |
| 120 | |
| 121 | std::string MetadataWalker::getMetadata(METADATA metadata) const { |
| 122 | switch (metadata) { |