You can write a simple function to convert the existing string to lower case as follows:
#include
#include
#include
#include
#include
std::string make_lowercase( const std::string& in )
{
std::string out;
std::transform( in.begin(), in.end(), std::back_inserter( out ), ::tolower );
return out;
}
int main()
{
if( make_lowercase( "Hello, World!" ) == std::string( "hello, world!" ) ) {
std::cout << "match found" << std::endl;
}
return 0;
}