iconvUtf8ToLocaleLength

fnstring iconvUtf8ToLocaleLength(string str, size_t n)

Allocates a new string buffer containing the first n bytes of str converted to the user's locale charset.

Parameters

strstring in UTF-8 charset
nnumber of bytes to convert

Returns

a new string buffer containing the first n bytes of

str converted to the user's locale charset.