| 1 | /* |
|---|
| 2 | DMW_CodeConv.h |
|---|
| 3 | |
|---|
| 4 | defines many code conversion, string manipulation API. |
|---|
| 5 | Separated from previous DMW_DebugUtil.h |
|---|
| 6 | |
|---|
| 7 | */ |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | #include "DMW_Platform.h" |
|---|
| 11 | |
|---|
| 12 | #ifndef __DMW_CODECONV_H__ |
|---|
| 13 | #define __DMW_CODECONV_H__ |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | UINT16 *DMW_GetKs2UcTable(void); |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | UINT8 *DMW_ConvUc2Ks(UINT16 *uc, int len); |
|---|
| 22 | void DMW_FreeKsString(UINT8 *ks); |
|---|
| 23 | int DMW_UniPrint(UINT16 *ucs, int len); |
|---|
| 24 | |
|---|
| 25 | char *DMW_Unicode2Ks(UINT16 *ucs, int len, char *buf); |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | UINT16 *DMW_ConvKs2Uc(char *ks, int len); |
|---|
| 29 | void DMW_FreeUcString(UINT16 *uc); |
|---|
| 30 | |
|---|
| 31 | char *DMW_MakeRandomKsString(char *buf, int size, int mode); |
|---|
| 32 | // mode 0 : english |
|---|
| 33 | // mode 1 : hangle |
|---|
| 34 | // mode 2~ : mixed |
|---|
| 35 | |
|---|
| 36 | int DMW_UcStringLen(UINT16 *ucs); |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | //---------------------------- |
|---|
| 41 | // unicode string library |
|---|
| 42 | |
|---|
| 43 | int UniStrLen(UINT16 *str); |
|---|
| 44 | UINT16 *UniStrCopy(UINT16 *dst, UINT16 *src); |
|---|
| 45 | UINT16 *UniStrNCopy(UINT16 *dst, UINT16 *src, int len); |
|---|
| 46 | UINT16 *UniStrCat(UINT16 *dst, UINT16 *src); |
|---|
| 47 | int UniStrCompare(UINT16 *str1, UINT16 *str2); |
|---|
| 48 | UINT16 *UniStrTrim(UINT16 *uStr); |
|---|
| 49 | void UniStrFromAscii(UINT16 *ustr, char *str); |
|---|
| 50 | UINT16 *UniStrCreate(char *str, UINT16 *ustr); |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | #endif // __DMW_CODECONV_H__ |
|---|
| 55 | |
|---|
| 56 | |
|---|
| 57 | |
|---|