summaryrefslogtreecommitdiff
path: root/src/stdlib/atoi.c
blob: 6e58dd2265bb923a758762c0fdec1b8e3a7f4d6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdlib.h>

/** convert string to integer **/

int atoi(const char * nptr)
{
	return (int)strtol(nptr, (char**)NULL, 10);
}

/***
converts the string at ARGUMENT(nptr) to an TYPE(int) value,
using base 10. The conversion goes until the first non-digit character.
***/

/*
LC_CTYPE
RETURN_SUCCESS(the converted value)
STDC(1)
*/