Home | History | Annotate | Download | only in src

Lines Matching full:unicstr

55  * @param unicstr a UCS-2 Unicode string
60 int ucs2_strlen(uint16_t const * const unicstr)
65 for(length = 0; unicstr[length] != 0x0000U; length ++);
75 * @param unicstr the UTF-16 unicode string to convert
78 char *utf16_to_utf8(LIBMTP_mtpdevice_t *device, const uint16_t *unicstr)
81 char *stringp = (char *) unicstr;
85 size_t convlen = (ucs2_strlen(unicstr)+1) * sizeof(uint16_t); // UCS-2 is 16 bit wide, include terminator
115 char unicstr[(STRING_BUFFER_LENGTH+1)*2]; // UCS2 encoding is 2 bytes per UTF-8 char.
116 char *unip = unicstr;
121 unicstr[0]='\0';
122 unicstr[1]='\0';
133 unicstr[STRING_BUFFER_LENGTH*2] = '\0';
134 unicstr[STRING_BUFFER_LENGTH*2+1] = '\0';
138 int ret_len = ucs2_strlen((uint16_t*)unicstr)*sizeof(uint16_t)+2;
140 memcpy(ret,unicstr,(size_t)ret_len);