Add easy way to verify games against the Redump database, supplied as CSV.

This commit is contained in:
Henrik Rydgård
2023-10-22 11:10:42 -06:00
parent 42dd37352f
commit 87ddb3f3b1
17 changed files with 333 additions and 26 deletions
+8
View File
@@ -45,6 +45,14 @@ inline bool startsWith(const std::string &str, const char *key) {
return !memcmp(str.data(), key, keyLen);
}
// Optimized for string views.
inline bool startsWith(std::string_view str, std::string_view key) {
size_t keyLen = key.size();
if (str.size() < keyLen)
return false;
return !memcmp(str.data(), key.data(), keyLen);
}
inline bool startsWith(const std::string &str, const std::string &what) {
if (str.size() < what.size())
return false;