skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

strnlen.c (247B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/sysdeps.h>
      4 
      5 #ifndef SKALIBS_HASSTRNLEN
      6 
      7 #include <string.h>
      8 #include <skalibs/bytestr.h>
      9 #include <skalibs/posixishard.h>
     10 
     11 size_t strnlen (char const *s, size_t max)
     12 {
     13   return byte_chr(s, max, 0) ;
     14 }
     15 
     16 #endif