/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* This is an example of the function wcsxfrm(wchar_t*, const wchar_t*,size_t).    
   This trnasforms a string based on locale-specific information.  It returns
   the length of the transformed string.
*/
#include <wchar.h>
#include <stdlib.h>

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

    line = "abc";
    len1 = strlen(line);
    mbstowcs(str2, line, len1);
    fputs("Source string: ", stdout);
    fputws(str2, stdout);
    retval = wcsxfrm(str1, str2,count);
    printf("\nThe length of the transformed string is:  %d\n", retval);
}

