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.
19 lines
251 B
19 lines
251 B
3 years ago
|
char *my_strncat(char *dest, char *src, unsigned int nb)
|
||
|
{
|
||
|
unsigned int i;
|
||
|
unsigned int j;
|
||
|
|
||
|
i = 0;
|
||
|
j = 0;
|
||
|
while (dest[i] != '\0')
|
||
|
i++;
|
||
|
while (src[j] != '\0' && j < nb)
|
||
|
{
|
||
|
dest[i] = src[j];
|
||
|
i++;
|
||
|
j++;
|
||
|
}
|
||
|
dest[i] = '\0';
|
||
|
return (dest);
|
||
|
}
|