strnlen
(3)determine the length of a fixed-size string
#include <string.h> size_t strnlen(const char s[.maxlen], size_t maxlen); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): strnlen(): Since glibc 2.10: _POSIX_C_SOURCE >= 200809L Before glibc 2.10: _GNU_SOURCE