|
|
1.1 root 1: .\" Copyright (c) 1990 The Regents of the University of California.
2: .\" All rights reserved.
3: .\"
4: .\" Redistribution and use in source and binary forms are permitted
5: .\" provided that: (1) source distributions retain this entire copyright
6: .\" notice and comment, and (2) distributions including binaries display
7: .\" the following acknowledgement: ``This product includes software
8: .\" developed by the University of California, Berkeley and its contributors''
9: .\" in the documentation or other materials provided with the distribution
10: .\" and in all advertising materials mentioning features or use of this
11: .\" software. Neither the name of the University nor the names of its
12: .\" contributors may be used to endorse or promote products derived
13: .\" from this software without specific prior written permission.
14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15: .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16: .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17: .\"
18: .\" @(#)atoi.3 5.1 (Berkeley) 5/16/90
19: .\"
20: .TH ATOI 3 "May 16, 1990"
21: .UC 7
22: .SH NAME
23: atoi \- convert ASCII string to integer
24: .SH SYNOPSIS
25: .nf
26: .ft B
27: #include <stdlib.h>
28:
29: int
30: atoi(const char *nptr);
31: .ft R
32: .fi
33: .SH DESCRIPTION
34: The
35: .I atoi
36: function converts the initial portion of the string pointed to by
37: .I nptr
38: to
39: .I integer
40: representation.
41: .PP
42: It is equivalent to:
43: .sp
44: .RS
45: (int)strtol(nptr, (char **)NULL, 10);
46: .RE
47: .SH SEE ALSO
48: atof(3), atol(3), strtod(3), strtol(3), strtoul(3)
49: .SH STANDARDS
50: .B Atoi
51: conforms to ANSI X3.159-1989 (``ANSI C'').
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.