char *strcpyn(char *str1, const char *str2, size_t count)
{
if (count <= 0) return str1;
*str1 = '\0';
return strncat(str1, str2, count-1);