1TICKIT_UTF8_PUT(3)         Library Functions Manual         TICKIT_UTF8_PUT(3)
2
3
4

NAME

6       tickit_utf8_put - append a UTF-8 encoded codepoint to a buffer
7

SYNOPSIS

9       #include <tickit.h>
10
11       size_t tickit_utf8_put(char *str, size_t len, long codepoint);
12
13       Link with -ltickit.
14

DESCRIPTION

16       tickit_utf8_put()  appends  bytes  into a buffer to represent the given
17       codepoint. The UTF-8 bytes will be appended directly starting from str,
18       and  the  function then returns the total number of bytes appended. The
19       length of the buffer should be given to as len; if the  buffer  is  not
20       long  enough  then it is left unmodified and -1 is returned instead. If
21       str is NULL then the function will simply return the number of bytes it
22       would need to append to represent the codepoint.
23
24       This  function  does not expect the buffer to be NUL-terminated, and it
25       will not terminate the buffer with a NUL byte on completion.
26

RETURN VALUE

28       tickit_utf8_put() returns the number of bytes appended to  the  buffer,
29       or -1 if the buffer was not long enough.
30

SEE ALSO

32       tickit_utf8_seqlen(3), tickit(7)
33
34
35
36                                                            TICKIT_UTF8_PUT(3)
Impressum