Return the length of str, limited to at most maxlen bytes.

Synopsis

Declared in <openssl/crypto.h>

size_t
OPENSSL_strnlen(
    char const* str,
    size_t maxlen);

Return Value

Number of non‐NUL bytes before the first NUL, or maxlen if none is found.

Parameters

Name

Description

str

Possibly non‐NUL‐terminated buffer to measure.

maxlen

Maximum number of bytes to examine.

Created with MrDocs