Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
utf8.h
1 #ifndef BASIC_UTF8_H
2 #define BASIC_UTF8_H
3 
4 typedef unsigned int UCS4;
5 
6 namespace utf8 {
7 
14 UCS4 decode(const char *&src, const char *src_end);
15 
21 int encode(UCS4 ch, char *dst);
22 
28 UCS4 decode_next(const char *str, int *i, int i_max);
29 
35 void move_inc(const char *str, int *i, int i_max);
36 
41 void move_dec(const char *str, int *i);
42 
48 int count_characters(const char *str, int i_max);
49 
50 } // namespace utf8
51 
52 #endif // BASIC_UTF8_H