The strcoll() function compares two strings depends upon the LC_COLLATE settings.
This function is defined in <cstring> header file.
Example
C++ Compiler
#include<iostream>#include<cstring>#include<clocale>using namespace std;
int main()
{
constchar str1[] ="Hallo";
constchar str2[] ="HALLO";
// de_DE - Germansetlocale(LC_COLLATE, "de_DE.UTF-8");
int res =strcoll(str1, str2);
if(res ==0)
cout <<"str1 is equal to str2";
else if(res >0)
cout <<"str1 is greater than str2";
else
cout <<"str1 is less than str2";
return0;
}