3 #ifndef __EKG_STRINGS_H 4 #define __EKG_STRINGS_H 24 #include "ekg2-config.h" 37 #define CHAR_T wchar_t 38 #define TEXT(x) (wchar_t *) L##x 39 #define CHAR(x) (wchar_t) L##x 40 #define STRING_FORMAT "%ls" 41 #define CHAR_FORMAT "%lc" 44 size_t xmbslen(
const char *str);
56 #define free_utf(x) xfree(x) 67 #define CHAR_T unsigned char 70 #define STRING_FORMAT "%s" 71 #define CHAR_FORMAT "%c" 73 #define xwcslen(str) xstrlen((char *) str) 74 #define xmbslen(str) xstrlen(str) 75 #define xwcscpy(dst, str) xstrcpy((char *) dst, (char *) str) 76 #define xwcsdup(str) (CHAR_T *) xstrdup((char *) str) 77 #define xwcscat(dst, src) xstrcat((char *) dst, (char *) src) 78 #define xwcscmp(s1, s2) xstrcmp((char *) s1, (char *) s2) 79 #define xwcschr(s, c) xstrchr((char *) s, c) 80 #define wcs_to_normal(x) (char *) x 81 #define wcs_array_make(str, sep, max, trim, quotes) (CHAR_T **) array_make((char *) str, sep, max, trim, quotes) 82 #define wcs_array_join(arr, sep) (CHAR_T *) g_strjoinv(sep, (char **) arr) 83 #define xwcslcpy(dst, src, size) g_strlcpy((char *) dst, (char *) src, size)
wchar_t * xwcsdup(wchar_t *str)
Definition: nc-strings.c:50
size_t xwcslcpy(wchar_t *dst, const wchar_t *src, size_t size)
Definition: nc-strings.c:110
wchar_t * xwcscpy(wchar_t *dst, wchar_t *src)
Definition: nc-strings.c:46
wchar_t * xwcscat(wchar_t *dst, const wchar_t *src)
Definition: nc-strings.c:55
size_t xwcslen(const wchar_t *str)
Definition: nc-strings.c:38
wchar_t * wcs_array_join(wchar_t **array, const wchar_t *sep)
Definition: nc-strings.c:126
wchar_t * xwcschr(const wchar_t *s, wchar_t c)
Definition: nc-strings.c:63
char * wcs_to_normal(const wchar_t *str)
Definition: nc-strings.c:67
int xwcscmp(const wchar_t *s1, const wchar_t *s2)
Definition: nc-strings.c:59
#define CHAR_T
Definition: nc-strings.h:37
size_t xmbslen(const char *str)
Definition: nc-strings.c:42
wchar_t ** wcs_array_make(const wchar_t *string, const wchar_t *sep, int max, int trim, int quotes)
Definition: nc-strings.c:90
wchar_t * normal_to_wcs(const char *str)
Definition: nc-strings.c:80