File:  [DVB] / dietlibc / lib / strnlen.c
Revision 1.1: download - view: text, annotated - select for diffs
Wed Sep 30 11:27:28 2015 UTC (8 years, 8 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
  move strnlen from libcompat into libc (it's POSIX now)
  fix dn_expand argument signedness

#include <string.h>

size_t strnlen(const char *s,size_t maxlen) {
  const char* x=memchr(s,0,maxlen);
  if (!x) x=s+maxlen;
  return x-s;
}


LinuxTV legacy CVS <linuxtv.org/cvs>