mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-11 23:38:57 +00:00
24 lines
315 B
C
24 lines
315 B
C
/*
|
|
* Derived from:
|
|
* http://www.kernel.org/pub/linux/libs/klibc/
|
|
*/
|
|
/*
|
|
* strchr.c
|
|
*/
|
|
|
|
#include <string.h>
|
|
#include <compat_attribute.h>
|
|
|
|
__WEAK__
|
|
char *strchr(const char *s, int c)
|
|
{
|
|
while (*s != (char)c) {
|
|
if (!*s) {
|
|
return NULL;
|
|
}
|
|
|
|
s++;
|
|
}
|
|
|
|
return (char *)s;
|
|
}
|