libc: Implement strchr()

This commit is contained in:
apio 2022-10-11 19:50:18 +02:00
parent 0131193379
commit feb8c1c31b

View File

@ -61,9 +61,11 @@ extern "C"
return dest;
}
char* strchr(const char*, int)
char* strchr(const char* str, int chr)
{
NOT_IMPLEMENTED("strchr");
while (*str && *str != (char)chr) str++;
if (*str) return const_cast<char*>(str);
return NULL;
}
void* memclr(void* start, size_t count)