iconvLocaleToUtf8Length

fnstring iconvLocaleToUtf8Length(string str, size_t n)

Allocates a new string buffer containing the first n bytes of str converted to UTF-8.

Parameters

strstring in locale charset
nnumber of bytes to convert

Returns

a new string buffer containing the first n bytes of

str converted to UTF-8.