VMS Help  —  CRTL  strnlen
    Returns the number of bytes in a string.

    Format

      #include  <string.h>

      size_t strnlen  (const char *s, size_t n);

1  –  Arguments

 s

    Pointer to the string.

 n

    The maximum number of characters to examine.

2  –  Description

    The strnlen function returns the number of bytes in the string
    pointed to by s. The string length value does not include the
    terminating null character. The strnlen function counts bytes
    until the first null byte or until n bytes have been examined.

3  –  Return Value

    n                  The length of the string.
Close Help