From 41ee6b43c89ce67808a684ba67f69e964b0636fa Mon Sep 17 00:00:00 2001 From: aqua Date: Sat, 18 Feb 2023 10:12:24 +0200 Subject: Move C stdlib to lib/libk --- lib/libk/string.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/libk/string.h (limited to 'lib/libk/string.h') diff --git a/lib/libk/string.h b/lib/libk/string.h new file mode 100644 index 0000000..c8196c8 --- /dev/null +++ b/lib/libk/string.h @@ -0,0 +1,28 @@ +#pragma once + +///@defgroup libk libk +///@{ +///@defgroup string string +///@{ + +#define OCTAL 8 +#define DECIMAL 10 +#define HEX 16 + +#ifdef __cplusplus +extern "C" { +#endif +/** + * Convert int into a string + */ +char *itoa(char *p, int x, int base); +/** + * Convert unsigned int into a string + */ +char *utoa(char *p, unsigned x, int base); +#ifdef __cplusplus +} +#endif + +///@} +///@} -- cgit v1.2.1