utf8Strncpy

fun utf8Strncpy(dest: String, src: String, n: <Error class: unknown class>): String

Like the standard C strncpy() function, but copies a given number of characters instead of a given number of bytes. The @src string must be valid UTF-8 encoded text. (Use g_utf8_validate() on all text before trying to use UTF-8 utility functions with it.)

Note you must ensure @dest is at least 4 * @n + 1 to fit the largest possible UTF-8 characters

Return

@dest

Parameters

dest

buffer to fill with characters from @src

src

UTF-8 encoded string

n

character count