13 lines
312 B
C
13 lines
312 B
C
#include <stdio.h>
|
|
#include <jstring.h>
|
|
|
|
void main()
|
|
{
|
|
JCHAR buffer[15];
|
|
|
|
printf( "%s\n", jstrncpy( buffer, "abcdefg", 10 ) );
|
|
printf( "%s\n", jstrncpy( buffer, "1234567", 6 ) );
|
|
printf( "%s\n", jstrncpy( buffer, "abcdefg", 3 ) );
|
|
printf( "%s\n", jstrncpy( buffer, "*******", 0 ) );
|
|
}
|