23 lines
439 B
C
23 lines
439 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 */
|
||
|
0x00
|
||
|
};
|
||
|
|
||
|
const unsigned char str2[] = {
|
||
|
0x81,0x40, /* double-byte space */
|
||
|
0x82,0xA6, /* double-byte Hiragana */
|
||
|
0x83,0x42, /* double-byte Katakana */
|
||
|
0x00
|
||
|
};
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
_setmbcp( 932 );
|
||
|
printf( "%d\n", _mbsnbcmp( str1, str2, 3 ) );
|
||
|
}
|