1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-22 14:00:13 +00:00

appears now uses simplified parameters

This commit is contained in:
Zeno Rogue 2018-09-28 01:49:56 +02:00
parent 1a96ffe928
commit acae962b13

View File

@ -130,8 +130,14 @@ int whateveri, whateveri2;
purehookset hooks_tests;
string simplify(const string& s) {
string res;
for(char c: s) if(isalnum(c)) res += c;
return res;
}
bool appears(const string& haystack, const string& needle) {
return haystack.find(needle) != string::npos;
return simplify(haystack).find(simplify(needle)) != string::npos;
}
/* indenter */