to_wstring

Converts a value to a wide string.

wstring to_wstring(long long _Val);
wstring to_wstring(unsigned long long _Val);
wstring to_wstring(long double _Val);

Parameter

Description

_Val

The value to be converted.

The wide string that represents the value.

The function converts _Val to a sequence of elements stored in an array object _Buf of size _Len internal to the function as if by calling swprintf(_Buf, _Len, _Fmt, _Val), where _Fmt is L"%lld" if _Val has type long long, L"%llu" if _Val has type unsigned long long, or L"%Lg" if _Val has type long double. The function returns wstring(_Buf).

Header: <string>

Namespace: std

Community Additions

ADD
Show: