/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* This is an example of the function wcscmp(const wchar_t*, const wchar_t*). 
   This function compares two strings.  If string1 < string2, then a negative
   number will be returned.  If string1 = string2, zero will be returned.  
   If string1 > string2, a positive number will be returned.
*/
#include <wchar.h>
#include <stdlib.h>

int main() { 
    const char *line, *line2;
    wchar_t str1[100], str2[100];        
    int retval,len1, len2;

    line = "hello";
    line2 = "hello";
    len1 = strlen(line);
    len2 = strlen(line2); 
    mbstowcs(str1, line, len1);
    mbstowcs(str2, line2, len2);  
    retval = wcscmp(str1, str2);
    if(retval > 0)
        printf("String1 is greater than String2\n");
    else if(retval == 0)
        printf("String1 is identical to String2\n");
    else if(retval < 0)
    	printf("String1 is less than String2\n");
    else
        printf("Error!\n");
}

