17 lines
277 B
C
17 lines
277 B
C
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <locale.h>
|
|
|
|
char src[] = { "A sample STRING" };
|
|
char dst[20];
|
|
|
|
void main()
|
|
{
|
|
size_t len;
|
|
|
|
setlocale( LC_ALL, "C" );
|
|
printf( "%s\n", src );
|
|
len = strxfrm( dst, src, 20 );
|
|
printf( "%s (%u)\n", dst, len );
|
|
}
|