aboutsummaryrefslogtreecommitdiff
path: root/std/stdlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'std/stdlib.c')
-rw-r--r--std/stdlib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/std/stdlib.c b/std/stdlib.c
index f405b6f..9510866 100644
--- a/std/stdlib.c
+++ b/std/stdlib.c
@@ -17,3 +17,12 @@ char charAt(char *str, int x) {
int parse_int(char *str) {
return (int) atoi(str);
}
+
+int as_int(float x) {
+ return (int) x;
+}
+
+char* istr(int x) {
+ char snum[100];
+ return (char* )itoa(x, snum, 10);
+}