summaryrefslogtreecommitdiff
path: root/src/boot/libc/strcpy.c
blob: e981d80fd02c9b7196a50e14e21d919377be3ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "libc/strcpy.h"

char* strcpy(char* dst, const char* src) {
    char* d = dst;

    while (*src != '\0') {
        *d++ = *src++;
    }
    *d = '\0';

    return dst;
}