Share via


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);

Parameters

Parameter

Description

_Val

The value to be converted.

Return Value

The wide string that represents the value.

Remarks

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).

Requirements

Header: <string>

Namespace: std

See Also

Reference

string (<string>)

wstring

<string>

Other Resources

<string> Members