GLib.utf8_strncpy

function utf8_strncpy(dest: String, src: String, n: Number(gsize)): String {
    // Gjs wrapper for g_utf8_strncpy()
}
  

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 GLib.utf8_validate on all text before trying to use UTF-8 utility functions with it.)

dest

buffer to fill with characters from src

src

UTF-8 encoded string

n

character count

Returns

dest