From eec8119eeea0ef0e226bd3541eebc9294cdd79b1 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sat, 27 Jan 2024 03:38:27 -0500 Subject: more lib fns --- include/lib.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/lib.h') diff --git a/include/lib.h b/include/lib.h index b368636..43b95a6 100644 --- a/include/lib.h +++ b/include/lib.h @@ -31,6 +31,18 @@ extern void *memset(void *restrict dest, int c, unsigned long n); */ extern int strncmp(const char *restrict s1, const char *restrict s2, unsigned long n); +/** + * Copys the string pointed to by src , into a string at the buffer pointer to by dest. + * The dest buffer must be long enough to hold src. + */ +extern char *strcpy(char *restrict dest, const char *restrict src); + +/** + * Copys the string pointed to by src , into a string at the buffer pointer to by dest. + * The dest buffer must be long enough to hold src or size n. + */ +extern char *strncpy(char *restrict dest, const char *restrict src, unsigned long n); + /** * @returns 1 if c is a space */ -- cgit v1.2.3-freya