summaryrefslogtreecommitdiff
path: root/lib/libc/string/strcpy.c
blob: eef2a5e403112adf9f9d60aa5ed15ecabc9115e6 (plain)
1
2
3
4
5
6
7
8
9
#include <string.h> // for strcpy

char *strcpy(char *restrict s1, const char *restrict s2)
{
	char *p = s1;
	while ((*p++ = *s2++) != '\0')
		;
	return s1;
}