dead code

This commit is contained in:
Matthew Kennedy 2024-03-27 16:57:06 -07:00
parent 06a660035c
commit e81172143b
1 changed files with 0 additions and 27 deletions

View File

@ -79,33 +79,6 @@ int indexOf(const char *string, char c) {
return -1; return -1;
} }
// string to integer
int atoi(const char *string) {
int len = strlen(string);
if (len == 0) {
return -ATOI_ERROR_CODE;
}
if (string[0] == '-') {
return -atoi(string + 1);
}
int result = 0;
for (int i = 0; i < len; i++) {
char c = string[i];
if (c < '0' || c > '9') {
if (i > 0) {
break;
} else {
return ATOI_ERROR_CODE;
}
}
int num = c - '0';
result = result * 10 + num;
}
return result;
}
static char todofixthismesswithcopy[100]; static char todofixthismesswithcopy[100];
static char *ltoa_internal(char *p, uint32_t num, unsigned radix) { static char *ltoa_internal(char *p, uint32_t num, unsigned radix) {