26 const std::string& query) {
30 std::string t = text, q = query;
31 std::transform(t.begin(), t.end(), t.begin(), ::tolower);
32 std::transform(q.begin(), q.end(), q.begin(), ::tolower);
38 if (t.find(q) != std::string::npos)
42 size_t ti = 0, qi = 0;
44 while (ti < t.length() && qi < q.length()) {
52 return (qi == q.length()) ? score : 0;