Man page - strncasecmp(3)

Packages contains this manual

Available languages:

en fr es ja ru ro de

Manual

STRCASECMP

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

名 前

strcasecmp, strncasecmp - 二 つ の 文 字 列 を 大 文 字 小 文 字 を 区 別 せ ず 比 較 す る

書 式

#include <strings.h>

int strcasecmp(const char * s1 , const char * s2 );

int strncasecmp(const char * s1 , const char * s2 , size_t n );

説 明

The strcasecmp () function performs a byte-by-byte comparison of the strings s1 and s2 , ignoring the case of the characters. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2 .

The strncasecmp () function is similar, except that it compares no more than n bytes of s1 and s2 .

返 り 値

The strcasecmp () and strncasecmp () functions return an integer less than, equal to, or greater than zero if s1 is, after ignoring case, found to be less than, to match, or be greater than s2 , respectively.

属 性

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

Image grohtml-24336-1.png

準 拠

4.4BSD, POSIX.1-2001, POSIX.1-2008.

注 意

関 数 strcasecmp () と strncasecmp () は 4.4BSD で 初 め て 登 場 し 、 そ の と き は <string.h> に 宣 言 が あ っ た 。 こ の よ う な 、 過 去 と の 互 換 性 確 保 の た め 、 機 能 検 査 マ ク ロ _DEFAULT_SOURCE (glibc 2.19 以 前 で は _BSD_SOURCE ) が 定 義 さ れ た 際 に 、 glibc の ヘ ッ ダ ー フ ァ イ ル <string.h> で も こ れ ら の 関 数 が 宣 言 さ れ て い る 。

The POSIX.1-2008 standard says of these functions:

When the LC_CTYPE category of the locale being used is from the POSIX locale, these functions shall behave as if the strings had been converted to lowercase and then a byte comparison performed. Otherwise, the results are unspecified.

関 連 項 目

bcmp (3), memcmp (3), strcmp (3), strcoll (3), string (3), strncmp (3), wcscasecmp (3), wcsncasecmp (3)

こ の 文 書 に つ い て

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