.\" -*- coding: UTF-8 -*- .\" Copyright (c) Bruno Haible .\" .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA) .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" %%%LICENSE_END .\" .\" References consulted: .\" GNU glibc-2 source code and manual .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH STRNLEN 3 "21 декабря 2020 г." GNU "Руководство программиста Linux" .SH ИМЯ strnlen \- вычисление длины строки постоянного размера .SH СИНТАКСИС .nf \fB#include \fP .PP \fBsize_t strnlen(const char *\fP\fIs\fP\fB, size_t \fP\fImaxlen\fP\fB);\fP .fi .PP .RS -4 Требования макроса тестирования свойств для glibc (см. \fBfeature_test_macros\fP(7)): .RE .PP \fBstrnlen\fP(): .PD 0 .ad l .RS 4 .TP 4 Начиная с glibc 2.10: _POSIX_C_SOURCE\ >=\ 200809L .TP До glibc 2.10: _GNU_SOURCE .RE .ad .PD .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 "ВОЗВРАЩАЕМОЕ ЗНАЧЕНИЕ" Функция \fBstrnlen\fP() возвращает \fIstrlen(s)\fP, если оно меньше \fImaxlen\fP, или \fImaxlen\fP, если среди первых \fImaxlen\fP байт, на которую указывает \fIs\fP, не встретился завершающий байт null (\(aq\e0\(aq). .SH АТРИБУТЫ Описание терминов данного раздела смотрите в \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Интерфейс Атрибут Значение T{ \fBstrnlen\fP() T} Безвредность в нитях MT\-Safe .TE .SH "СООТВЕТСТВИЕ СТАНДАРТАМ" POSIX.1\-2008. .SH "СМ. ТАКЖЕ" \fBstrlen\fP(3) .SH ЗАМЕЧАНИЯ Эта страница является частью проекта Linux \fIman\-pages\fP версии 5.10. Описание проекта, информацию об ошибках и последнюю версию этой страницы можно найти по адресу \%https://www.kernel.org/doc/man\-pages/. .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 .