Implement the strncpy function

Implement the strncpy function as efficiently as you can..
How do you handle errors if you had to