From 1ca95575ae136af5524420df46a04bd03f68de1d Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 28 Sep 2025 23:28:27 -0400 Subject: kern: lib: Add strdup() Signed-off-by: Ian Moffett --- src/sys/include/lib/string.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/sys/include') diff --git a/src/sys/include/lib/string.h b/src/sys/include/lib/string.h index 3da8b5f..e7c9905 100644 --- a/src/sys/include/lib/string.h +++ b/src/sys/include/lib/string.h @@ -68,6 +68,13 @@ int snprintf(char *s, size_t size, const char *fmt, ...); */ char *itoa(int64_t value, char *buf, int base); +/* + * Duplicate a string onto heap + * + * @s: String to duplicate + */ +char *strdup(const char *s); + __END_DECLS #endif /* !_LIB_STRING_H */ -- cgit v1.2.3