Man page - strnlen(3)

Packages contains this manual

Available languages:

en fr pt_BR es pl ja ru ro de

Manual

STRNLEN

名 前
書 式
説 明
返 り 値
属 性
準 拠
関 連 項 目
こ の 文 書 に つ い て

名 前

strnlen - 固 定 長 の 文 字 列 の 長 さ を 調 べ る

書 式

#include <string.h>

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

glibc 向 け の 機 能 検 査 マ ク ロ の 要 件 ( feature_test_macros (7) 参 照 ):

strnlen ():

glibc 2.10 以 降 :

_POSIX_C_SOURCE >= 200809L

glibc 2.10 よ り 前 :

_GNU_SOURCE

説 明

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] .

返 り 値

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 .

属 性

こ の 節 で 使 用 さ れ て い る 用 語 の 説 明 に つ い て は 、 attributes (7) を 参 照 。

Image grohtml-41556-1.png

準 拠

POSIX.1-2008.

関 連 項 目

strlen (3)

こ の 文 書 に つ い て

こ の man ペ ー ジ は Linux man-pages プ ロ ジ ェ ク ト の リ リ ー ス 5.10 の 一 部 で あ る 。 プ ロ ジ ェ ク ト の 説 明 と バ グ 報 告 に 関 す る 情 報 は https://www.kernel.org/doc/man-pages/ に 書 か れ て い る 。