.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (c) Bruno Haible .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" .\" References consulted: .\" GNU glibc-2 source code and manual .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH strnlen 3 "20 июля 2023 г." "Linux man\-pages 6.05.01" .SH ИМЯ strnlen \- вычисление длины строки постоянного размера .SH LIBRARY Standard C library (\fIlibc\fP, \fI\-lc\fP) .SH СИНТАКСИС .nf \fB#include \fP .PP \fBsize_t strnlen(const char \fP\fIs\fP\fB[.\fP\fImaxlen\fP\fB], size_t \fP\fImaxlen\fP\fB);\fP .fi .PP .RS -4 Требования макроса тестирования свойств для glibc (см. \fBfeature_test_macros\fP(7)): .RE .PP \fBstrnlen\fP(): .nf Начиная с glibc 2.10: _POSIX_C_SOURCE >= 200809L До glibc 2.10: _BSD_SOURCE .fi .SH ОПИСАНИЕ The \fBstrnlen\fP() function returns the number of bytes in the string pointed to by \fIs\fP, excluding the terminating null byte (\[aq]\e0\[aq]), but at most \fImaxlen\fP. In doing this, \fBstrnlen\fP() looks only at the first \fImaxlen\fP characters in the string pointed to by \fIs\fP and never beyond \fIs[maxlen\-1]\fP. .SH "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" The \fBstrnlen\fP() function returns \fIstrlen(s)\fP, if that is less than \fImaxlen\fP, or \fImaxlen\fP if there is no null terminating (\[aq]\e0\[aq]) among the first \fImaxlen\fP characters pointed to by \fIs\fP. .SH АТРИБУТЫ Описание терминов данного раздела смотрите в \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Интерфейс Атрибут Значение T{ .na .nh \fBstrnlen\fP() T} Безвредность в нитях MT\-Safe .TE .sp 1 .SH СТАНДАРТЫ POSIX.1\-2008. .SH ИСТОРИЯ POSIX.1\-2008. .SH "СМ. ТАКЖЕ" \fBstrlen\fP(3) .PP .SH ПЕРЕВОД Русский перевод этой страницы руководства был сделан Alexander Golubev , Azamat Hackimov , Hotellook, Nikita , Spiros Georgaras , Vladislav , Yuri Kozlov и Иван Павлов . .PP Этот перевод является бесплатной документацией; прочитайте .UR https://www.gnu.org/licenses/gpl-3.0.html Стандартную общественную лицензию GNU версии 3 .UE или более позднюю, чтобы узнать об условиях авторского права. Мы не несем НИКАКОЙ ОТВЕТСТВЕННОСТИ. .PP Если вы обнаружите ошибки в переводе этой страницы руководства, пожалуйста, отправьте электронное письмо на .MT man-pages-ru-talks@lists.sourceforge.net .ME .