xref: /csrg-svn/lib/libc/stdlib/atoi.3 (revision 61180)
1*61180Sbostic.\" Copyright (c) 1990, 1991, 1993
2*61180Sbostic.\"	The Regents of the University of California.  All rights reserved.
342105Sbostic.\"
450284Sbostic.\" This code is derived from software contributed to Berkeley by
550284Sbostic.\" the American National Standards Committee X3, on Information
650284Sbostic.\" Processing Systems.
750284Sbostic.\"
842105Sbostic.\" %sccs.include.redist.man%
942105Sbostic.\"
10*61180Sbostic.\"     @(#)atoi.3	8.1 (Berkeley) 06/04/93
1142105Sbostic.\"
1248349Scael.Dd
1348349Scael.Dt ATOI 3
1448349Scael.Os
1548349Scael.Sh NAME
1648349Scael.Nm atoi
1748349Scael.Nd convert
1848349Scael.Tn ASCII
1948349Scaelstring to integer
2048349Scael.Sh SYNOPSIS
2148349Scael.Fd #include <stdlib.h>
2248349Scael.Ft int
2348349Scael.Fn atoi "const char *nptr"
2448349Scael.Sh DESCRIPTION
2542105SbosticThe
2648349Scael.Fn atoi
2742105Sbosticfunction converts the initial portion of the string pointed to by
2848349Scael.Em nptr
2942105Sbosticto
3048349Scael.Em integer
3142105Sbosticrepresentation.
3248349Scael.Pp
3342105SbosticIt is equivalent to:
3448349Scael.Bd -literal -offset indent
3542105Sbostic(int)strtol(nptr, (char **)NULL, 10);
3648349Scael.Ed
3748349Scael.Sh SEE ALSO
3848349Scael.Xr atof 3 ,
3948349Scael.Xr atol 3 ,
4048349Scael.Xr strtod 3 ,
4148349Scael.Xr strtol 3 ,
4248349Scael.Xr strtoul 3
4348349Scael.Sh STANDARDS
4448349ScaelThe
4548349Scael.Fn atoi
4648349Scaelfunction conforms to
4748349Scael.St -ansiC .
48