kolibrios/programs/develop/ktcc/trunk/libc/string/strchr.c

12 lines
173 B
C
Raw Normal View History

#include <string.h>
char* strchr(const char* string, int c)
{
do {
if (*string == (char)c)
return (char*)string;
} while (*string++);
return NULL;
}