mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-29 14:13:11 +00:00
appears now uses simplified parameters
This commit is contained in:
parent
1a96ffe928
commit
acae962b13
8
util.cpp
8
util.cpp
@ -130,8 +130,14 @@ int whateveri, whateveri2;
|
|||||||
|
|
||||||
purehookset hooks_tests;
|
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) {
|
bool appears(const string& haystack, const string& needle) {
|
||||||
return haystack.find(needle) != string::npos;
|
return simplify(haystack).find(simplify(needle)) != string::npos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* indenter */
|
/* indenter */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user