C Library Functions: Type Conversion

Function Header File Description
atof stdlib.h Converts a character string to a floating-point value.
atoi stdlib.h Converts a character string to an integer.
atol stdlib.h Converts a character string to a long integer.
_atold stdlib.h
math.h
Converts a character string to a long double value.
atoll stdlib.h Converts a character string to a long long integer.
ecvt stdlib.h Converts a floating-point number to a character string.
fcvt stdlib.h Converts a floating-point number to a character string, rounding according to the FORTRAN F format.
gcvt stdlib.h Converts a floating-point value to a character string, rounding according to the FORTRAN F or FORTRAN E formats.
_itoa stdlib.h Converts the digits of an integer to a character string.
_ltoa stdlib.h Converts the digits of a long integer to a character string.
strtod stdlib.h Converts a character string to a double value.
strtol stdlib.h Converts a character string to a long integer.
strtold stdlib.h Converts a character string to a long double value.
strtoll stdlib.h Converts a character string to a long long integer.
strtoul stdlib.h Converts a string to an unsigned long integer.
strtoull stdlib.h Converts a string to an unsigned long long integer.
_ultoa stdlib.h Converts the values of an unasigned long value to a character string.
_ulltoa stdlib.h Converts the values of an unasigned long long value to a character string.
wcstod wchar.h Converts a wide character string to a double value.
wcstol wchar.h Converts a wide character string to a long integer.
wcstoul wchar.h Converts a wide character string to an unsigned long integer.
wctob wchar.h Converts a wide character to a single-byte character.

Multibyte and Wide-Character Type Conversion

Function Header File Description
btowc stdio.h
wchar.h
 
mbrtowc wchar.h
Converts a multibyte character to a wide character (wchar_t); restartable version of mbtowc.
mbsrtowcs wchar.h Converts a multibyte character string to a wide character (wchar_t) string; restartable version of mbstowcs.
mbstowcs stdlib.h Converts a multibyte character string to a wide character (wchar_t) string.
mbtowc stdlib.h Converts a multibyte character to a wide character (wchar_t).
wcrtomb wchar.h Converts a wide character (wchar_t) to a multibyte character; restartable version of wctomb.
wcsrtombs wchar.h Converts a wide character (wchar_t) string to a multibyte character string; restartable version of wctomb.
wcstombs stdlib.h Converts a wide character (wchar_t) string to a multibyte character string.
wctomb stdlib.h Converts a wide character (wchar_t) to a multibyte character.


Alphabetical Listing of IBM C and C++ Compilers Functions and Macros