removed changing into set function, since no sets are used anymore

This commit is contained in:
2026-01-07 12:10:55 +01:00
parent df9874b3e2
commit 3339e6d6a2

View File

@@ -8,32 +8,3 @@ void trim(std::string &str) {
str.erase(str.find_last_not_of('"') + 1);
str.erase(0, str.find_first_not_of('"'));
}
std::set<std::string> convert_string_to_set(std::string input) {
std::set<std::string> result;
std::string buffer;
size_t left, right;
left = input.find_first_of('[');
right = input.find_last_of(']');
if (left == std::string::npos || right == std::string::npos ||
right <= left) {
return result;
}
input = input.substr(left + 1, right - left - 1);
std::stringstream ss(input);
while (getline(ss, buffer, ',')) {
buffer.erase(0, buffer.find_first_not_of(" \t"));
buffer.erase(buffer.find_last_not_of(" \t") + 1);
if (buffer.size() >= 2 && buffer.front() == '"' && buffer.back() == '"') {
buffer = buffer.substr(1, buffer.size() - 2);
result.insert(buffer);
}
}
return result;
}