OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / original / man3 / wcsnlen.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" References consulted:
9 .\"   GNU glibc-2 source code and manual
10 .\"   Dinkumware C library reference http://www.dinkumware.com/
11 .\"   OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
12 .\"
13 .TH WCSNLEN 3  2007-07-26 "GNU" "Linux Programmer's Manual"
14 .SH NAME
15 wcsnlen \- determine the length of a fixed-size wide-character string
16 .SH SYNOPSIS
17 .nf
18 .B #define _GNU_SOURCE
19 .B #include <wchar.h>
20 .sp
21 .BI "size_t wcsnlen(const wchar_t *" s ", size_t " maxlen );
22 .fi
23 .SH DESCRIPTION
24 The
25 .BR wcsnlen ()
26 function is the wide-character equivalent
27 of the
28 .BR strnlen (3)
29 function.
30 It returns the number of wide-characters in the string pointed to by
31 \fIs\fP, not including the terminating L\(aq\\0\(aq character, but at most
32 \fImaxlen\fP.
33 In doing this,
34 .BR wcsnlen ()
35 looks only at the first \fImaxlen\fP
36 wide-characters at \fIs\fP and never beyond \fIs+maxlen\fP.
37 .SH "RETURN VALUE"
38 The
39 .BR wcsnlen ()
40 function returns \fIwcslen(s)\fP, if that is less than
41 \fImaxlen\fP, or \fImaxlen\fP if there is no L\(aq\\0\(aq character among the
42 first \fImaxlen\fP wide characters pointed to by \fIs\fP.
43 .SH "CONFORMING TO"
44 This function is a GNU extension.
45 .SH "SEE ALSO"
46 .BR strnlen (3),
47 .BR wcslen (3)