You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
char *my_strncpy(char *dest, char *src, unsigned int n)
|
|
{
|
|
unsigned int i;
|
|
|
|
i = 0;
|
|
while (i < n && src[i] != '\0')
|
|
{
|
|
dest[i] = src[i];
|
|
i++;
|
|
}
|
|
while (i < n)
|
|
{
|
|
dest[i] = '\0';
|
|
i++;
|
|
}
|
|
return (dest);
|
|
}
|