xref: /titanic_41/usr/src/man/man3c/wcslen.3c (revision 2cd8d409f7a1b4749ee611cec28b63f45eb9f84d)
1*2cd8d409SGarrett D'Amore.\"
2*2cd8d409SGarrett D'Amore.\" This file and its contents are supplied under the terms of the
3*2cd8d409SGarrett D'Amore.\" Common Development and Distribution License ("CDDL"), version 1.0.
4*2cd8d409SGarrett D'Amore.\" You may only use this file in accordance with the terms of version
5*2cd8d409SGarrett D'Amore.\" 1.0 of the CDDL.
6*2cd8d409SGarrett D'Amore.\"
7*2cd8d409SGarrett D'Amore.\" A full copy of the text of the CDDL should have accompanied this
8*2cd8d409SGarrett D'Amore.\" source.  A copy of the CDDL is also available via the Internet at
9*2cd8d409SGarrett D'Amore.\" http://www.illumos.org/license/CDDL.
10*2cd8d409SGarrett D'Amore.\"
11*2cd8d409SGarrett D'Amore.\"
12*2cd8d409SGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
13*2cd8d409SGarrett D'Amore.\"
14*2cd8d409SGarrett D'Amore.Dd "Nov 4, 2014"
15*2cd8d409SGarrett D'Amore.Dt WCSLEN 3C
16*2cd8d409SGarrett D'Amore.Os
17*2cd8d409SGarrett D'Amore.Sh NAME
18*2cd8d409SGarrett D'Amore.Nm wcslen ,
19*2cd8d409SGarrett D'Amore.Nm wcsnlen
20*2cd8d409SGarrett D'Amore.Nd get length of wide-character string
21*2cd8d409SGarrett D'Amore.Sh SYNOPSIS
22*2cd8d409SGarrett D'Amore.In wchar.h
23*2cd8d409SGarrett D'Amore.
24*2cd8d409SGarrett D'Amore.Ft size_t
25*2cd8d409SGarrett D'Amore.Fo wcslen
26*2cd8d409SGarrett D'Amore.Fa "const wchar_t *string"
27*2cd8d409SGarrett D'Amore.Fc
28*2cd8d409SGarrett D'Amore.
29*2cd8d409SGarrett D'Amore.Ft size_t
30*2cd8d409SGarrett D'Amore.Fo wcsnlen
31*2cd8d409SGarrett D'Amore.Fa "const wchar_t *string"
32*2cd8d409SGarrett D'Amore.Fa "size_t maxlen"
33*2cd8d409SGarrett D'Amore.Fc
34*2cd8d409SGarrett D'Amore.
35*2cd8d409SGarrett D'Amore.Sh DESCRIPTION
36*2cd8d409SGarrett D'AmoreThe
37*2cd8d409SGarrett D'Amore.Fn wcslen
38*2cd8d409SGarrett D'Amoreand
39*2cd8d409SGarrett D'Amore.Fn wcsnlen
40*2cd8d409SGarrett D'Amorefunctions count the number of wide-characters that are present in
41*2cd8d409SGarrett D'Amore.Fa string .
42*2cd8d409SGarrett D'AmoreThey stop counting when they encounter a null wide-character.
43*2cd8d409SGarrett D'AmoreThe terminating null wide-character is not included in the count.
44*2cd8d409SGarrett D'Amore.Lp
45*2cd8d409SGarrett D'AmoreAdditionally,
46*2cd8d409SGarrett D'Amore.Fn wcsnlen
47*2cd8d409SGarrett D'Amorestops counting after it has counted
48*2cd8d409SGarrett D'Amore.Fa maxlen
49*2cd8d409SGarrett D'Amorewide-characters.
50*2cd8d409SGarrett D'Amore.Lp
51*2cd8d409SGarrett D'AmoreThe
52*2cd8d409SGarrett D'Amore.Fn wcslen
53*2cd8d409SGarrett D'Amoreand
54*2cd8d409SGarrett D'Amore.Fn wcsnlen
55*2cd8d409SGarrett D'Amorefunctions are the wide-character equivalents of
56*2cd8d409SGarrett D'Amore.Xr strlen 3C
57*2cd8d409SGarrett D'Amoreand
58*2cd8d409SGarrett D'Amore.Xr strnlen 3C ,
59*2cd8d409SGarrett D'Amorerespectively.
60*2cd8d409SGarrett D'Amore.Sh RETURN VALUES
61*2cd8d409SGarrett D'AmoreThe
62*2cd8d409SGarrett D'Amore.Fn wcslen
63*2cd8d409SGarrett D'Amorefunction returns the length of
64*2cd8d409SGarrett D'Amore.Fa string .
65*2cd8d409SGarrett D'AmoreThe
66*2cd8d409SGarrett D'Amore.Fn wcsnlen
67*2cd8d409SGarrett D'Amorefunction returns the smaller of the length of
68*2cd8d409SGarrett D'Amore.Fa string
69*2cd8d409SGarrett D'Amoreand
70*2cd8d409SGarrett D'Amore.Fa maxlen .
71*2cd8d409SGarrett D'Amore.Sh ERRORS
72*2cd8d409SGarrett D'AmoreNone.
73*2cd8d409SGarrett D'Amore.Sh INTERFACE STABILITY
74*2cd8d409SGarrett D'Amore.Sy Standard .
75*2cd8d409SGarrett D'Amore.Sh MT-LEVEL
76*2cd8d409SGarrett D'Amore.Sy MT-Safe .
77*2cd8d409SGarrett D'Amore.Sh SEE ALSO
78*2cd8d409SGarrett D'Amore.Xr free 3C ,
79*2cd8d409SGarrett D'Amore.Xr strlen 3C ,
80*2cd8d409SGarrett D'Amore.Xr strnlen 3C ,
81*2cd8d409SGarrett D'Amore.Xr wchar.h 3HEAD ,
82*2cd8d409SGarrett D'Amore.Xr locale 5 ,
83*2cd8d409SGarrett D'Amore.Xr standards 5
84*2cd8d409SGarrett D'Amore.Sh STANDARDS
85*2cd8d409SGarrett D'AmoreThe
86*2cd8d409SGarrett D'Amore.Fn wcslen
87*2cd8d409SGarrett D'Amorefunction was introduced in
88*2cd8d409SGarrett D'Amore.St -xpg4
89*2cd8d409SGarrett D'Amoreand standardized in
90*2cd8d409SGarrett D'Amore.St -isoC-99 .
91*2cd8d409SGarrett D'AmoreThe
92*2cd8d409SGarrett D'Amore.Fn wcsnlen
93*2cd8d409SGarrett D'Amorefunction was introduced in
94*2cd8d409SGarrett D'Amore.St -p1003.1-2008 .
95