Add methods for converting between Collections (asBag, asSet, etc)
[panda.git] / src / st-unicode.h
blob8c09b451ab4f0012f84740e46333f4db8f95ca32
2 #ifndef __ST_UNICODE_H__
3 #define __ST_UNICODE_H__
5 #include <st-types.h>
6 #include <unistd.h>
8 void st_unicode_init (void);
10 void st_unicode_canonical_decomposition (const st_unichar *in,
11 int inlen,
12 st_unichar **out,
13 int *outlen);
15 #define st_utf8_skip(c) (((0xE5000000 >> (((c) >> 3) & 0xFE)) & 3) + 1)
16 #define st_utf8_next_char(p) (char *)((p) + st_utf8_skip (*(const char *)(p)))
18 int st_utf8_strlen (const char *string);
19 st_unichar st_utf8_get_unichar (const char *p);
20 bool st_utf8_validate (const char *string, ssize_t max_len);
21 int st_unichar_to_utf8 (st_unichar ch, char *outbuf);
22 const char *st_utf8_offset_to_pointer (const char *string, st_uint offset);
23 st_unichar *st_utf8_to_ucs4 (const char *string);
25 #endif /* __ST_UNICODE_H__ */