The libc implementation
Martin ‘Solar’ Baute
Public Domain
strtoll.c | The libc implementation |
Functions | |
strtoll | Converts a string in s to an long long. |
Todo’s | |
These tests assume two-complement, but conversion should work | |
test “odd” overflow, i. e. base is not power of two | |
test “odd” overflow, i. e. base is not power of two |
long long int strtoll( const char * s, char ** endptr, int base )
Converts a string in s to an long long.
A nonzero base can be supplied to force a specific radix.
endptr can be supplied in order to get a pointer to the remainder of the string
Returns the value in the string if present, clamped to the maximum on overflow
Returns 0 if the string isn’t a number
Converts a string in s to an long long.
long long int strtoll( const char * s, char ** endptr, int base )