blob: ba774aad44c73b0d78c626b698149947fe17b357 (
plain)
1
2
3
4
5
6
7
8
9
10
|
/* ISC license. */
#include <string.h>
#include <skalibs/bytestr.h>
size_t byte_chr (char const *s, size_t n, int c)
{
void *p = memchr(s, c, n) ;
return p ? (char *)p - s : n ;
}
|