24 lines
461 B
C
24 lines
461 B
C
|
#include <stdio.h>
|
||
|
#include <mbctype.h>
|
||
|
#include <mbstring.h>
|
||
|
|
||
|
const unsigned char str1[] = {
|
||
|
0x81,0x40, /* double-byte space */
|
||
|
0x82,0x60, /* double-byte A */
|
||
|
0x82,0x79, /* double-byte Z */
|
||
|
0x00
|
||
|
};
|
||
|
|
||
|
const unsigned char str2[] = {
|
||
|
0x81,0x40, /* double-byte space */
|
||
|
0x82,0x81, /* double-byte a */
|
||
|
0x82,0x9a, /* double-byte z */
|
||
|
0x00
|
||
|
};
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
_setmbcp( 932 );
|
||
|
printf( "%d\n", _mbsnbicmp( str1, str2, 5 ) );
|
||
|
}
|