Export (0) Print
Expand All

to_wstring

Converts a value to a wide string.

wstring to_wstring(int Val);
wstring to_wstring(unsigned int Val);
wstring to_wstring(long Val);
wstring to_wstring(unsigned long Val);
wstring to_wstring(long long Val);
wstring to_wstring(unsigned long long Val);
wstring to_wstring(float Val);
wstring to_wstring(double 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 internal to the function as if by calling swprintf(Buf, Len, Fmt, Val), where Fmt is

  • L"%d" if Val has type int

  • L"%u" if Val has type unsigned int

  • L"%ld" if Val has type long

  • L"%lu" if Val has type unsigned long

  • L"%lld" if Val has type long long

  • L"%llu" if Val has type unsigned long long

  • L"%f" if Val has type float or double

  • L"%Lf" if Val has type long double

The function returns wstring(Buf).

Header: <string>

Namespace: std

Show:
© 2015 Microsoft