summaryrefslogtreecommitdiff
path: root/src/libposixplz/strnlen.c
blob: 1c4145cf68f095ef3c7de0de24723d5e9e053be6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* ISC license. */

#include <skalibs/sysdeps.h>

#ifndef SKALIBS_HASSTRNLEN

#include <string.h>
#include <skalibs/bytestr.h>
#include <skalibs/posixishard.h>

size_t strnlen (char const *s, size_t max)
{
  return byte_chr(s, max, 0) ;
}

#endif