strnlen(3) Library Functions Manual strnlen(3) NOME strnlen - determina o comprimento de uma string de tamanho fixo BIBLIOTECA Biblioteca C Padrao (libc, -lc) SINOPSE #include size_t strnlen(const char s[.maxlen], size_t maxlen); Requisitos de macro de teste de recursos para o glibc (consulte feature_test_macros(7)): strnlen(): Desde o glibc 2.10: _POSIX_C_SOURCE >= 200809L Antes do glibc 2.10: _GNU_SOURCE DESCRICAO The strnlen() function returns the number of bytes in the string pointed to by s, excluding the terminating null byte ('\0'), but at most maxlen. In doing this, strnlen() looks only at the first maxlen characters in the string pointed to by s and never beyond s[maxlen-1]. VALOR DE RETORNO The strnlen() function returns strlen(s), if that is less than maxlen, or maxlen if there is no null terminating ('\0') among the first maxlen characters pointed to by s. ATRIBUTOS Para uma explicacao dos termos usados nesta secao, consulte attributes(7). +--------------------------------------------+---------------+---------+ |Interface | Atributo | Valor | +--------------------------------------------+---------------+---------+ |strnlen() | Thread safety | MT-Safe | +--------------------------------------------+---------------+---------+ PADROES POSIX.1-2008. HISTORICO POSIX.1-2008. VEJA TAMBEM strlen(3) TRADUCAO A traducao para portugues brasileiro desta pagina man foi criada por Marcelo M. de Abreu , Andre Luiz Fassone e Rafael Fontenelle . Esta traducao e uma documentacao livre; leia a Licenca Publica Geral GNU Versao 3 ou posterior para as condicoes de direitos autorais. Nenhuma responsabilidade e aceita. Se voce encontrar algum erro na traducao desta pagina de manual, envie um e-mail para a lista de discussao de tradutores . Linux man-pages 6.06 31 outubro 2023 strnlen(3)