summaryrefslogtreecommitdiff
path: root/lib/libc/string/strcat.c
blob: 6caf8c78b4f5395920d0ebbd61278b11f177d887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
char *strcat(char *restrict s1, const char *restrict s2)
{
	char *d = s1;

	while (*d)
		d++;

	while (*s2)
		*d++ = *s2++;

	*d = '\0';

	return s1;
}