Skip to content

Latest commit

 

History

History
66 lines (63 loc) · 7.59 KB

File metadata and controls

66 lines (63 loc) · 7.59 KB
title Data Conversion | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-standard-libraries
ms.tgt_pltfrm
ms.topic article
f1_keywords
c.conversions
dev_langs
C++
helpviewer_keywords
data conversion routines [C++]
converting data
ms.assetid b15b5268-7467-49f1-bf95-5299b598f94c
caps.latest.revision 12
author corob-msft
ms.author corob
manager ghogen

Data Conversion

These routines convert data from one form to another. Generally these routines execute faster than conversions you might write. Each routine that begins with a to prefix is implemented as a function and as a macro. See Choosing Between Functions and Macros for information about choosing an implementation.

Data-Conversion Routines

Routine Use
abs Find absolute value of integer
atof, _atof_l, _wtof, _wtof_l Convert string to float
atoi, _atoi_l, _wtoi, _wtoi_l Convert string to int
_atoi64, _atoi64_l, _wtoi64, _wtoi64_l Convert string to __int64
atol, _atol_l, _wtol, _wtol_l Convert string to long
c16rtomb, c32rtomb Convert UTF-16 or UTF-32 character to equivalent multibyte character
_ecvt, _ecvt_s Convert double to string of specified length
_fcvt, _fcvt_s Convert double to string with specified number of digits following decimal point
_gcvt, _gcvt_s Convert double number to string; store string in buffer
_itoa, _i64toa, _ui64toa, _itow, _i64tow, _ui64tow, _itoa_s, _i64toa_s, _ui64toa_s, _itow_s, _i64tow_s, _ui64tow_s Convert int or __int64 to string
labs Find absolute value of long integer
llabs Find absolute value of long long integer
_ltoa, _ltow, _ltoa_s, _ltow_s Convert long to string
_mbbtombc, _mbbtombc_l Convert 1-byte multibyte character to corresponding 2-byte multibyte character
_mbcjistojms, _mbcjistojms_l, _mbcjmstojis, _mbcjmstojis_l Convert Japan Industry Standard (JIS) character to Japan Microsoft (JMS) character
_mbcjistojms, _mbcjistojms_l, _mbcjmstojis, _mbcjmstojis_l Convert JMS character to JIS character
_mbctohira, _mbctohira_l, _mbctokata, _mbctokata_l Convert multibyte character to 1-byte hiragana code
_mbctohira, _mbctohira_l, _mbctokata, _mbctokata_l Convert multibyte character to 1-byte katakana code
_mbctombb, _mbctombb_l Convert 2-byte multibyte character to corresponding 1-byte multibyte character
mbrtoc16, mbrtoc32 Convert multibyte character to equivalent UTF-16 or UTF-32 character
mbstowcs, _mbstowcs_l, mbstowcs_s, _mbstowcs_s_l Convert sequence of multibyte characters to corresponding sequence of wide characters
mbtowc, _mbtowc_l Convert multibyte character to corresponding wide character
strtod, _strtod_l, wcstod, _wcstod_l Convert string to double
strtol, wcstol, _strtol_l, _wcstol_l Convert string to long integer
strtoul, _strtoul_l, wcstoul, _wcstoul_l Convert string to unsigned long integer
strxfrm, wcsxfrm, _strxfrm_l, _wcsxfrm_l Transform string into collated form based on locale-specific information
toascii, __toascii Convert character to ASCII code
tolower, _tolower, towlower, _tolower_l, _towlower_l, _mbctolower, _mbctolower_l, _mbctoupper, _mbctoupper_l Test character and convert to lowercase if currently uppercase
tolower, _tolower, towlower, _tolower_l, _towlower_l Convert character to lowercase unconditionally
toupper, _toupper, towupper, _toupper_l, _towupper_l, _mbctolower, _mbctolower_l, _mbctoupper, _mbctoupper_l Test character and convert to uppercase if currently lowercase
toupper, _toupper, towupper, _toupper_l, _towupper_l Convert character to uppercase unconditionally
_ultoa, _ultow, _ultoa_s, _ultow_s Convert unsigned long to string
wcstombs, _wcstombs_l, wcstombs_s, _wcstombs_s_l Convert sequence of wide characters to corresponding sequence of multibyte characters
wctomb, _wctomb_l, wctomb_s, _wctomb_s_l Convert wide character to corresponding multibyte character
atof, _atof_l, _wtof, _wtof_l Convert wide-character string to a double
atoi, _atoi_l, _wtoi, _wtoi_l Convert wide-character string to int
_atoi64, _atoi64_l, _wtoi64, _wtoi64_l Convert wide-character string to __int64
atol, _atol_l, _wtol, _wtol_l Convert wide-character string to long

See Also

Run-Time Routines by Category