1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
#include <algorithm>
#include <iostream>
#include <vector>
#include <boost/algorithm/string.hpp>

auto str_equivalence_ignore_case(const std::string& text) {
   /* FIXME */
}

int main() {
   std::vector<std::string> a = {"hello", "Hallo", "willkommen"};
   auto look_for_hello = str_equivalence_ignore_case("hallo");
   auto it = std::find_if(a.begin(), a.end(), look_for_hello);
   std::cout << "std::find_if stopped at: ";
   if (it != a.end()) {
      std::cout << "'" << *it << "'";
   } else {
      std::cout << "end";
   }
   std::cout << std::endl;
}