.\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the American National Standards Committee X3, on Information .\" Processing Systems. .\" .\" %sccs.include.redist.man% .\" .\" @(#)atoi.3 8.1 (Berkeley) 06/04/93 .\" .Dd .Dt ATOI 3 .Os .Sh NAME .Nm atoi .Nd convert .Tn ASCII string to integer .Sh SYNOPSIS .Fd #include .Ft int .Fn atoi "const char *nptr" .Sh DESCRIPTION The .Fn atoi function converts the initial portion of the string pointed to by .Em nptr to .Em integer representation. .Pp It is equivalent to: .Bd -literal -offset indent (int)strtol(nptr, (char **)NULL, 10); .Ed .Sh SEE ALSO .Xr atof 3 , .Xr atol 3 , .Xr strtod 3 , .Xr strtol 3 , .Xr strtoul 3 .Sh STANDARDS The .Fn atoi function conforms to .St -ansiC .