logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Description

tickit_utf8_put()  appends  bytes into a buffer to represent the given codepoint. The UTF-8 bytes will be
       appended directly starting from str, and the function then returns the total number  of  bytes  appended.
       The  length  of  the  buffer  should be given to as len; if the buffer is not long enough then it is left
       unmodified and -1 is returned instead. If str is NULL then the function will simply return the number  of
       bytes it would need to append to represent the codepoint.

       This  function does not expect the buffer to be NUL-terminated, and it will not terminate the buffer with
       a NUL byte on completion.

Name

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

Return Value

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

See Also

tickit_utf8_seqlen(3), tickit(7)

                                                                                              TICKIT_UTF8_PUT(3)

Synopsis

#include<tickit.h>size_ttickit_utf8_put(char*str,size_tlen,longcodepoint);

       Link with -ltickit.

See Also