summaryrefslogtreecommitdiff
path: root/riscv/riscv-probe/libfemto/std/strchr.c
blob: 7eef221e3976a2a6a1a2bed1ac4bda1d53f5141c (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <string.h>

char *strchr(const char *s, int c)
{
    char *p = (char *)s;
    while (*p) {
       if (*p == c) return p;
       p++;
    }
    return NULL;
}