diff options
Diffstat (limited to 'std/stdlib.c')
| -rw-r--r-- | std/stdlib.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/std/stdlib.c b/std/stdlib.c index d27b36f..7e77385 100644 --- a/std/stdlib.c +++ b/std/stdlib.c @@ -1,13 +1,19 @@ #include <unistd.h> +#include <stdlib.h> +#include <string.h> void wait(long long x) { sleep(x); } -int slen(char *str) { - return strlen(str); +long long slen(char *str) { + return (long long) strlen(str); } -char charAt(char *str, int) { - return str[int]; +char charAt(char *str, long long x) { + return str[x]; +} + +long long parse_int(char *str) { + return (long long) atoi(str); } |
