wcsncmp

Section: C Library Functions (3)
Updated: 2026-02-08
Index JM Home Page roff page
 

名前

wcsncmp - 2 つの固定長ワイド文字文字列を比較する  

ライブラリ

標準 C ライブラリ (libc,~-lc)  

書式

#include <wchar.h>

int wcsncmp(const wchar_t s1[], const wchar_t s2[], size_t n);
 

説明

The wcsncmp() function is the wide-character equivalent of the strncmp(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. In each string, the comparison extends only up to the first occurrence of a null wide character (L'\0'), if any.  

返り値

wcsncmp() 関数は、s1 と s2 がそれぞれ指す文字列を n 文字に収まるように切り詰めたものが等しければ 0 を返す。 この関数は、異なる文字が最初に現われた位置 i (i < n) において、その位置にある文字 s1[i] が s2[i] より大きければ 正の値を返す。異なる文字が最初に現われた位置 i (i < n) において、その位置にある文字 s1[i] が s2[i] より小さければ 負の値を返す。  

属性

この節で使用されている用語の説明については、 attributes(7) を参照。
インターフェース属性値
wcsncmp() Thread safetyMT-Safe
 

標準規格

C11, POSIX.1-2008.  

歴史

POSIX.1-2001, C99.  

関連項目

strncmp(3), wcsncasecmp(3)


 

Index

名前
ライブラリ
書式
説明
返り値
属性
標準規格
歴史
関連項目

This document was created by man2html, using the manual pages.