yw_string_assign_utf8

Name

yw_string_assign_utf8 -- assign UTF8 string

Synopsis


     #include <yw/string.h>
   

int yw_string_assign_utf8(YwString *s, const uint8_t *chars, int len);

DESCRIPTION

This function initializes *s to contain UTF8 encoded string passed in chars parameter, of length (in bytes) len. chars can be NULL if len is 0. If len is -1 then length of chars parameter is determined based on 0 terminator.

RETURN VALUE

This function returns 0 in case of success or one of yw_convert(3) return codes when there is an error in parametrs encoding.

SEE ALSO

yw_string_assign_cstring (3),

INFO

Generated from: string.c,v 1.6 2001/05/23 08:46:01 malekith Exp.