 |
Index for Section 9 |
|
 |
Alphabetical listing for A |
|
 |
Bottom of page |
|
atoi(9r)
NAME
atoi - General: Converts an ASCII string to an integer
SYNOPSIS
int atoi(
char *s1 );
ARGUMENTS
s1 Specifies a pointer to a string (an array of characters terminated by a
null character).
DESCRIPTION
The atoi interface converts the specified ASCII string to an integer. The
string can contain decimal integer constants. Specifically, the atoi
interface converts the specified ASCII character string up to the first
character inconsistent with the format of a decimal integer to an integer
data type. Leading white-space characters are ignored.
NOTES
The atoi interface is a modified version of the atoi C library interface
that applications call. The kernel version of atoi is intended for use in
those few cases in the kernel where the conversion of an ASCII string to an
integer is required (for example, generic boot code).
RETURN VALUES
The atoi interface returns the converted value of an integer if the
specified ASCII string is in the expected form. Otherwise, it returns a
negative integer.
 |
Index for Section 9 |
|
 |
Alphabetical listing for A |
|
 |
Top of page |
|