liba 0.1.15
An algorithm library based on C/C++
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Loading...
Searching...
No Matches
utf.h
Go to the documentation of this file.
1
13
14#ifndef LIBA_UTF_H
15#define LIBA_UTF_H
16
17#include "a.h"
18
24
25#if defined(__cplusplus)
26extern "C" {
27#endif /* __cplusplus */
28
35A_EXTERN unsigned int a_utf_encode(a_u32 val, void *buf);
36
46A_EXTERN unsigned int a_utf_decode(void const *ptr, a_size num, a_u32 *val);
47
56A_EXTERN a_size a_utf_length(void const *ptr, a_size num, a_size *stop);
57A_EXTERN a_size a_utf_length_(void const *ptr, a_size num);
58
59#if defined(__cplusplus)
60} /* extern "C" */
61#endif /* __cplusplus */
62
64
65#endif /* a/utf.h */
algorithm library
unsigned int a_utf_encode(a_u32 val, void *buf)
encode one unicode code point into UTF-8
a_size a_utf_length(void const *ptr, a_size num, a_size *stop)
number of unicode code points in a UTF-8 encoded byte sequence
unsigned int a_utf_decode(void const *ptr, a_size num, a_u32 *val)
decode one unicode code point from UTF-8
unsigned long a_u32
unsigned integer type with width of exactly 32 bits
Definition a.h:538
size_t a_size
unsigned integer type returned by the sizeof operator
Definition a.h:823