byte_rchr.c (202B)
1 /* ISC license. */ 2 3 #include <skalibs/bytestr.h> 4 5 size_t byte_rchr (char const *s, size_t n, int c) 6 { 7 size_t i = n ; 8 char ch = c ; 9 s += n ; 10 while (i--) if (*--s == ch) return i ; 11 return n ; 12 }
skalibsMirror/fork of https://skarnet.org/software/skalibs/ | |
git clone https://ccx.te2000.cz/git/skalibs | |
Log | Files | Refs | README | LICENSE |