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