server/libthecore/include/hangul.h

32 lines
876 B
C
Raw Normal View History

2022-03-05 12:44:06 +02:00
#ifndef __INC_LIBTHECORE_HANGUL_H__
#define __INC_LIBTHECORE_HANGUL_H__
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
#ifdef __WIN32__
#define isdigit iswdigit
#define isspace iswspace
#endif
#define ishan(ch) (((ch) & 0xE0) > 0x90)
#define ishanasc(ch) (isascii(ch) || ishan(ch))
#define ishanalp(ch) (isalpha(ch) || ishan(ch))
#define isnhdigit(ch) (!ishan(ch) && isdigit(ch))
#define isnhspace(ch) (!ishan(ch) && isspace(ch))
extern const char * first_han(const BYTE * str); // ù<><C3B9>° <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<29><> <20>̾<EFBFBD> <20><>/<2F><>/<2F><>/..<2E><> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
extern int check_han(const char * str); // <20>ѱ<EFBFBD><D1B1≯<EFBFBD> true <20><>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> üũ
extern int is_hangul(const BYTE * str); // <20>ѱ<EFBFBD><D1B1≯<EFBFBD> true (2<><32><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> üũ)
extern int under_han(const void * orig); // <20><>ħ<EFBFBD><C4A7> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> true
#define UNDER(str) under_han(str)
#ifdef __cplusplus
};
#endif
#endif