Objective
Implement a function that copies at most n bytes from src into dst, padding the rest of dst with \0 when src is shorter than n, and writing no terminator at all when src is n bytes or longer.
Steps
$ strncpy(dst, "git", 8) // dst pre-filled with 10 '#', dump 10 bytes
git.....##
$ strncpy(dst, "rebase", 6) // src length == n: copied, no terminator
rebase####
$ strncpy(dst, "docker", 4) // src longer than n: truncated, no terminator
dock######
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

Objective
Implement a function that copies at most n bytes from src into dst, padding the rest of dst with \0 when src is shorter than n, and writing no terminator at all when src is n bytes or longer.
Steps
$ strncpy(dst, "git", 8) // dst pre-filled with 10 '#', dump 10 bytes
git.....##
$ strncpy(dst, "rebase", 6) // src length == n: copied, no terminator
rebase####
$ strncpy(dst, "docker", 4) // src longer than n: truncated, no terminator
dock######
Expected files
Allowed functions
None. Write every helper yourself.
Allowed headers
Standard C library
Implements the contract of a function from the standard C library.

Tests
Run the tests to grade your code