tail head cat sleep
QR code linking to this page

manページ  — MEMCMP

名称

memcmp

内容

ライブラリ

Standard C Library (libc, -lc)– バイト列を比較する

書式

#include <string.h>

int
memcmp(const void *b1, const void *b2, size_t len);

解説

memcmp() 関数は、バイト列 b1 をバイト列 b2 と比較します。 両方のバイト列は、 len の長さのバイト列であるとみなされます。

戻り値

memcmp() 関数は、2 つのバイト列が一致する場合、0 を返します。 そうでない時は、最初に一致しなかった 2 つのバイト間の差 (unsigned char の値として扱われます。たとえば '\00' は 'amp;\0' よりも大きくなります。) が返されます。 長さが 0 のバイト列は常に一致します。

関連項目

bcmp(3), strcasecmp(3), strcmp(3), strcoll(3), strxfrm(3)

規格

memcmp() 関数は、 ISO/IEC 9899:1990 ("ISO C90") に適合しています。

MEMCMP (3) June 4, 1993

tail head cat sleep
QR code linking to this page


このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.

“ Like a classics radio station whose play list spans decades, Unix simultaneously exhibits its mixed and dated heritage. There's Clash-era graphics interfaces; Beatles-era two-letter command names; and systems programs (for example, ps) whose terse and obscure output was designed for slow teletypes; Bing Crosby-era command editing (# and @ are still the default line editing commands), and Scott Joplin-era core dumps. ”
— The Unix Haters' handbook