aboutsummaryrefslogtreecommitdiff
path: root/src/userspace/mlibc/string/strcat.c
blob: 0374e6c147139f88523d2f5afaf3ec4a5844d9a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <mlibc/stdlib.h>

void strcat(char *dest, const char *orig)
{
	size_t s_dest = strlen(dest);
	size_t s_orig = strlen(orig);

	for (size_t i = 0; i < s_orig; i++)
		dest[s_dest + i] = orig[i];
	dest[s_dest + s_orig] = 0;
}