Answers for "string compare c++ case sensitive"

C++
3

c++ compare strings ignore case

#include <boost/algorithm/string.hpp>
// Or, for fewer header dependencies:
//#include <boost/algorithm/string/predicate.hpp>

std::string str1 = "hello, world!";
std::string str2 = "HELLO, WORLD!";

if (boost::iequals(str1, str2))
{
    // Strings are identical
}
Posted by: Guest on September-28-2020

Code answers related to "string compare c++ case sensitive"

Browse Popular Code Answers by Language