wxString str1("Hello World"); wxString str2("Hello World"); if(str1.IsSameAs(str2)){ std::cout << "Strings are Same" << std::endl; } else{ std::cout << "Strings are Different" << std::endl; }
wxString str1("Hello World"); wxString str2("HELLO WORLD"); if(str1.IsSameAs(str2, false)){ std::cout << "Strings are Same" << std::endl; } else{ std::cout << "Strings are Different" << std::endl; }In this example, we are creating two wxString objects str1 and str2 with different case values. Then we are using the IsSameAs() function with the argument 'false' to ignore the case while comparing both strings. Package Library: This function is a part of the wxString class of the wxWidgets library, which is a cross-platform GUI toolkit written in C++.