From 83fbe2b2f748b976a7e2df4adc17f6b20aa11687 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 11 Oct 2025 12:09:54 -0400 Subject: libc: string: Add itoa() implementation Signed-off-by: Ian Moffett --- src/lib/libc/include/string.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/lib/libc/include') diff --git a/src/lib/libc/include/string.h b/src/lib/libc/include/string.h index bce2950..3923a3b 100644 --- a/src/lib/libc/include/string.h +++ b/src/lib/libc/include/string.h @@ -80,4 +80,16 @@ void *memcpy(void *dest, const void *src, size_t n); */ void *memset(void *s, int c, size_t n); +/* + * Convert an integer base to string form + * + * @value: Value to convert to string + * @buf: Buffer to use + * @base: Radix to use + * + * Returns 'buf' on success, otherwise a value of + * NULL on failure. + */ +char *itoa(int64_t value, char *buf, int base); + #endif /* _STRING_H */ -- cgit v1.2.3