Function stdio_strncpy

Function Documentation

char *stdio_strncpy(char *dest, const char *src, size_t n)

Copy one string over another.

This routine copies one string over top of another until the null byte is found or until n bytes have been written, whichever comes first. As per the standard library strncpy(), if strlen(haystack) < n, then the remaining bytes in dest are filled with zeroes.

Parameters:
  • dest – Copy destination.

  • src – Copy source.

  • n – Max # of bytes to copy.

Returns:

Pointer to dest.