1 /**
2  * chewing-utf8-util.h
3  *
4  * Copyright (c) 2005, 2006
5  *	libchewing Core Team. See ChangeLog for details.
6  *
7  * See the file "COPYING" for information on usage and redistribution
8  * of this file.
9  */
10 
11 #ifndef CHEWING_UTF8_UTILS_H
12 #define CHEWING_UTF8_UTILS_H
13 
14 /* Return length of UTF-8 string */
15 int ueStrLen( char *str );
16 
17 /* Return bytes of a UTF-8 character */
18 int ueBytesFromChar( unsigned char b );
19 
20 #define STRNCPY_CLOSE 1
21 #define STRNCPY_NOT_CLOSE 0
22 
23 /* Return how many bytes was copied */
24 int ueStrNCpy( char dest[], const char *src, size_t n, int end );
25 
26 /* Return address from n length after src */
27 char *ueStrSeek( char *src, size_t n );
28 
29 #endif /* CHEWING_UTF8_UTILS_H */
30