pretty-print tags on startup

This commit is contained in:
Lion Kortlepel
2023-12-28 12:58:29 +01:00
parent 16d3c6f796
commit 6787843b37
5 changed files with 25 additions and 12 deletions

View File

@@ -348,3 +348,14 @@ std::string GetPlatformAgnosticErrorString() {
return "(no human-readable errors on this platform)";
#endif
}
// TODO: add unit tests to SplitString
void SplitString(const std::string& str, const char delim, std::vector<std::string>& out) {
size_t start;
size_t end = 0;
while ((start = str.find_first_not_of(delim, end)) != std::string::npos) {
end = str.find(delim, start);
out.push_back(str.substr(start, end - start));
}
}