Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

atoi(3c) [hpux man page]

strtol(3C)																strtol(3C)

NAME
strtol(), atol(), atoll(), atoi(), strtoul(), strtoll(), strtoull() - convert string to integer SYNOPSIS
DESCRIPTION
or converts the character string pointed to by str to or representation, respectively. or converts the character string pointed to by str to or representation, respectively. The string is scanned up to the first character inconsistent with the base. Leading "white-space" characters (as defined by in ctype(3C)) are ignored. If no conversion can take place, zero is returned. If base is greater than or equal to 2 and less than or equal to 36, it is used as the base for conversion. After an optional leading sign, leading zeros are ignored, and or is ignored if base is 16. If base is zero, the string itself determines the base as follows: after an optional leading sign, a leading zero indicates octal conver- sion; a leading or indicates hexadecimal conversion. Otherwise, decimal conversion is used. If the value of ptr is not a pointer to the character terminating the scan is returned in the location pointed to by ptr. If no integer can be formed, the location pointed to by ptr is set to str, and zero is returned. is equivalent to is equivalent to is equivalent to RETURN VALUE
Upon successful completion, all functions return the converted value, if any. If the correct value would cause overflow: returns or (according to the sign of the value), and sets to returns and sets to returns or (according to the sign of the value), and sets to returns and sets to returns or (according to the sign of the value), and sets to For all other errors, zero is returned and is set to indicate the error. ERRORS
and fail and is set, if any of the following conditions are encountered: The value of base is not supported. The value to be returned would have caused overflow. AUTHOR
These interfaces were developed by OSF and HP. SEE ALSO
ctype(3C), strtod(3C), strtoimax(3C), scanf(3S), thread_safety(5), glossary(9). STANDARDS CONFORMANCE
strtol(3C)

Check Out this Related Man Page

wcstol(3C)																wcstol(3C)

NAME
wcstol(), wcstoll(), wcstoul(), wcstoull() - convert wide character string to long integer SYNOPSIS
Remarks These functions are compliant with the XPG4 Worldwide Portability Interface wide-character formatting functions. They parallel the 8-bit character formatting functions defined in strtol(3C). DESCRIPTION
or converts the wide character string pointed to by nptr to or representation, respectively. or converts the wide character string pointed to by nptr to or representation, respectively. The wide character string is scanned up to the first wide character inconsistent with the base. Leading "white-space" wide characters (as defined by in wctype(3C)) are ignored. If no conversion can take place, zero is returned. If base is greater than or equal to 2 and less than or equal to 36, it is used as the base for conversion. After an optional leading sign, leading zeros are ignored, and or is ignored if base is 16. If base is zero, the wide character string itself determines the base as follows: after an optional leading sign, a leading zero indicates octal conversion; a leading or indicates hexadecimal conversion. Otherwise, decimal conversion is used. If the value of endptr is not a pointer to the wide character terminating the scan is returned in the location pointed to by endptr. If no integer can be formed, the location pointed to by endptr is set to nptr, and zero is returned. Definitions for these functions and the type are provided in the header file. EXTERNAL INFLUENCES
Locale The category determines how wide character codes are interpreted. International Code Set Support Single- and multi-byte character code sets are supported. RETURN VALUE
Upon successful completion, both functions return the converted value, if any. If the correct value would cause overflow: returns or (according to the sign of the value), and sets to returns and sets to returns or (according to the sign of the value), and sets to returns and sets to For all other errors, zero is returned and is set to indicate the error. ERRORS
and fail and is set, if any of the following conditions are encountered: The value of base is not supported. The value to be returned would have caused overflow. AUTHOR
These interfaces were developed by OSF and HP. SEE ALSO
wctype(3C), wcstod(3C), wcstoimax(3C), scanf(3S), thread_safety(5), glossary(9). STANDARDS CONFORMANCE
wcstol(3C)
Man Page