1.\" Copyright (c) 1990, 1991 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)atoi.3 5.2 (Berkeley) 04/19/91 7.\" 8.Dd 9.Dt ATOI 3 10.Os 11.Sh NAME 12.Nm atoi 13.Nd convert 14.Tn ASCII 15string to integer 16.Sh SYNOPSIS 17.Fd #include <stdlib.h> 18.Ft int 19.Fn atoi "const char *nptr" 20.Sh DESCRIPTION 21The 22.Fn atoi 23function converts the initial portion of the string pointed to by 24.Em nptr 25to 26.Em integer 27representation. 28.Pp 29It is equivalent to: 30.Pp 31.Bd -literal -offset indent 32(int)strtol(nptr, (char **)NULL, 10); 33.Ed 34.Sh SEE ALSO 35.Xr atof 3 , 36.Xr atol 3 , 37.Xr strtod 3 , 38.Xr strtol 3 , 39.Xr strtoul 3 40.Sh STANDARDS 41The 42.Fn atoi 43function conforms to 44.St -ansiC . 45