wcsncasecmpのヘルプ・マニュアル
日本語 英語
wcsncasecmp --help
man wcsncasecmp
WCSNCASECMP(3) Linux Programmer’s Manual WCSNCASECMP(3)
名前
wcsncasecmp - 大文字と小文字を区別せず、2 つの固定長のワイド文字文字列
を比較する
書式
#define _GNU_SOURCE
#include
int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
説明
wcsncasecmp() 関数は、 strncasecmp(3) 関数に対応するワイド文字関数で あ
る。この関数は、s1 が指すワイド文字文字列と s2 が指すワイド文字文字列を
比較するが、最大でも先頭のワイド文字 n 個しか比較しない。また、大文字と
小文字 (towupper(3), towlower(3)) は区別しない。
返り値
wcsncasecmp() 関数は、s1 と s2 がそれぞれ指す文字列を n 文字に収まるよ
うに切り詰めたものを、大文字と小文字の違いを無視して比較したときに等 し
け れば 0 を返す。この関数は、大文字と小文字を区別しない場合に、s1 を切
り詰めたものが s2 を切り詰めたものより大きければ正の値を返す。この関 数
は、大文字と小文字を区別しない場合に、s1 を切り詰めたものが s2 を切り詰
めたものより小さければ負の値を返す。
準拠
POSIX.1-2008. この関数は POSIX.1-2001 では規定されていないが 、 Linux
以外の他のシステムで広く利用可能である。
注意
wcsncasecmp() の動作は、現在のロケールの LC_CTYPE カテゴリに依存する。
関連項目
strncasecmp(3), wcsncmp(3)
GNU 2009-02-04 WCSNCASECMP(3)
WCSNCASECMP(3) Linux Programmer’s Manual WCSNCASECMP(3)
NAME
wcsncasecmp - compare two fixed-size wide-character strings, ignoring
case
SYNOPSIS
#define _GNU_SOURCE
#include
int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n);
DESCRIPTION
The wcsncasecmp() function is the wide-character equivalent of the
strncasecmp(3) function. It compares the wide-character string pointed
to by s1 and the wide-character string pointed to by s2, but at most n
wide characters from each string, ignoring case differences (towup-
per(3), towlower(3)).
RETURN VALUE
The wcsncasecmp() function returns zero if the wide-character strings
at s1 and s2, truncated to at most length n, are equal except for case
distinctions. It returns a positive integer if truncated s1 is greater
than truncated s2, ignoring case. It returns a negative integer if
truncated s1 is smaller than truncated s2, ignoring case.
CONFORMING TO
POSIX.1-2008. This function is not specified in POSIX.1-2001, and is
not widely available on other systems.
NOTES
The behavior of wcsncasecmp() depends on the LC_CTYPE category of the
current locale.
SEE ALSO
strncasecmp(3), wcsncmp(3)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2009-02-04 WCSNCASECMP(3)