summaryrefslogtreecommitdiff
path: root/src/lib/libc/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-11 12:09:54 -0400
committerIan Moffett <ian@osmora.org>2025-10-11 12:09:54 -0400
commit83fbe2b2f748b976a7e2df4adc17f6b20aa11687 (patch)
tree39910744873082aacf43cee88f9bc732b02b4cc8 /src/lib/libc/include
parenta8e68c192e730da2cd319bf4d6d7e665dee37646 (diff)
libc: string: Add itoa() implementation
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/lib/libc/include')
-rw-r--r--src/lib/libc/include/string.h12
1 files changed, 12 insertions, 0 deletions
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 */