#include"string.h"
char*strncpy(char*restrict dst,const char*restrict src,size_t n)
{
	register size_t i=0;
	char*ret=dst;

        do *dst++=*src; while(*src++ && ++i<n);

	if(i<n)
		do *dst++='\0'; while(++i<n);

	return ret;
}
