aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/lib/string/strcat.c
blob: e0d6885ced418dc109adca5e6ee61d8d93cc90ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include <kernel/lib/string.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;
}