xref: /freebsd/lib/libc/locale/wcstol.3 (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1.\" Copyright (c) 2002 Tim J. Robbins
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd September 7, 2002
26.Dt WCSTOL 3
27.Os
28.Sh NAME
29.Nm wcstol , wcstoul ,
30.Nm wcstoll , wcstoull ,
31.Nm wcstoimax , wcstoumax
32.Nd "convert a wide character string value to a"
33.Vt long ,
34.Vt "unsigned long" ,
35.Vt "long long" ,
36.Vt "unsigned long long" ,
37.Vt intmax_t
38or
39.Vt uintmax_t
40integer
41.Sh LIBRARY
42.Lb libc
43.Sh SYNOPSIS
44.In wchar.h
45.Ft long
46.Fn wcstol "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
47.Ft "unsigned long"
48.Fn wcstoul "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
49.Ft "long long"
50.Fn wcstoll "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
51.Ft "unsigned long long"
52.Fn wcstoull "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
53.In inttypes.h
54.Ft intmax_t
55.Fn wcstoimax "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
56.Ft uintmax_t
57.Fn wcstoumax "const wchar_t * restrict nptr" "wchar_t ** restrict endptr" "int base"
58.Sh DESCRIPTION
59The
60.Fn wcstol ,
61.Fn wcstoul ,
62.Fn wcstoll ,
63.Fn wcstoull ,
64.Fn wcstoimax
65and
66.Fn wcstoumax
67functions are wide-character versions of the
68.Fn strtol ,
69.Fn strtoul ,
70.Fn strtoll ,
71.Fn strtoull ,
72.Fn strtoimax
73and
74.Fn strtoumax
75functions, respectively.
76Refer to their manual pages (for example
77.Xr strtol 3 )
78for details.
79.Sh SEE ALSO
80.Xr strtol 3 ,
81.Xr strtoul 3
82.Sh STANDARDS
83The
84.Fn wcstol ,
85.Fn wcstoul ,
86.Fn wcstoll ,
87.Fn wcstoull ,
88.Fn wcstoimax
89and
90.Fn wcstoumax
91functions conform to
92.St -isoC-99 .
93