Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #strings #ignore #case
ADD COMMENT
Topic
Name
5+7 =