yw_string_get_utf16

Name

yw_string_get_utf16 -- get value of string in UTF16

Synopsis


     #include <yw/string.h>
   

int yw_string_get_utf16(const YwString *s, uint16_t **chars, int *len);

DESCRIPTION

This function fetches value of *s in UTF16, host-endian, encoding and stores pointer to yw_malloc()ed vactor of characters at *chars. Length in characters (not bytes) is stored at *len, if it's not NULL.

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 (in the later case neither *chars nor *len is touched). Note, that it's up to the caller to yw_free(3) resulting vactor, which *chars is pointing at.

SEE ALSO

yw_string_get_cstring (3), yw_free (3),

INFO

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