diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-28 23:28:27 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-28 23:28:27 -0400 |
commit | 1ca95575ae136af5524420df46a04bd03f68de1d (patch) | |
tree | 7ccdc6a58a2417164f0f6a57e98eb5ebb509fc39 /src/sys/include/lib/string.h | |
parent | d10c7b9e2674278006886f7b6d389ccbda15bb80 (diff) |
kern: lib: Add strdup()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include/lib/string.h')
-rw-r--r-- | src/sys/include/lib/string.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ |