wcsnlenのヘルプ・マニュアル
日本語 英語
wcsnlen --help
man wcsnlen
WCSNLEN(3) Linux Programmer’s Manual WCSNLEN(3)
名前
wcsnlen - 固定長のワイド文字文字列の長さを求める
書式
#define _GNU_SOURCE
#include
size_t wcsnlen(const wchar_t *s, size_t maxlen);
説明
wcsnlen() 関数は、 strnlen(3) 関数に対応するワイド文字関数である。この
関数は、s が指す文字列中のワイド文字の数を返すが、これは最大 maxlen 文
字 ま で で ある。また、終端の L'\0' 文字は含まない。これを行う際には、
wcsnlen() は s が指すワイド文字列の最初の maxlen 文字しか見ず、決 し て
s+maxlen 文字を超えて文字列を参照することはない。
返り値
wcsnlen() 関数は、wcslen(s) の値が maxlen より小さければ wcslen(s) を返
す。あるいは、s が指すワイド文字列中の最初の maxlen 文字に L'\0' 文字が
含まれていなければ maxlen を返す。
準拠
この関数は GNU 拡張である。
関連項目
strnlen(3), wcslen(3)
GNU 2007-07-26 WCSNLEN(3)
WCSNLEN(3) Linux Programmer’s Manual WCSNLEN(3)
NAME
wcsnlen - determine the length of a fixed-size wide-character string
SYNOPSIS
#define _GNU_SOURCE
#include
size_t wcsnlen(const wchar_t *s, size_t maxlen);
DESCRIPTION
The wcsnlen() function is the wide-character equivalent of the
strnlen(3) function. It returns the number of wide-characters in the
string pointed to by s, not including the terminating L'\0' character,
but at most maxlen. In doing this, wcsnlen() looks only at the first
maxlen wide-characters at s and never beyond s+maxlen.
RETURN VALUE
The wcsnlen() function returns wcslen(s), if that is less than maxlen,
or maxlen if there is no L'\0' character among the first maxlen wide
characters pointed to by s.
CONFORMING TO
This function is a GNU extension.
SEE ALSO
strnlen(3), wcslen(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 2007-07-26 WCSNLEN(3)