http://kor.i2p/books/The%20C%20Programming%20Language%20by%20K&R/chapter5.html
Write versions of the library functions strncpy , strncat , and strncmp , which operate on at
most the first n characters of their argument strings. For example, strncpy(s,t,n) copies at most n characters of t to s . Full descriptions are in Appendix B .