{{fbdoc item="title" value="WSTR"}}----
Returns a wide-character string representation of a number or ASCII character string

{{fbdoc item="syntax"}}##
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgByte|byte]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgUbyte|ubyte]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgShort|short]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgUshort|ushort]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgLong|long]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgUlong|ulong]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgLongint|longint]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgUlongint|ulongint]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgSingle|single]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //n// [[KeyPgAs|as]] [[KeyPgDouble|double]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByref|byref]] //str// [[KeyPgAs|as]] [[KeyPgConstQualifier|const]] [[KeyPgString|string]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Wstr** ( [[KeyPgByval|byval]] //str// [[KeyPgAs|as]] [[KeyPgConstQualifier|const]] [[KeyPgWstring|wstring]] [[KeyPgPtr|ptr]] ) [[KeyPgAs|as]] [[KeyPgWstring|wstring]]
##
{{fbdoc item="usage"}}##
	//result// = **Wstr**( //number// )
		//or//
	//result// = **Wstr**( //string// )
##
{{fbdoc item="param"}}
	##//number//##
		Numeric expression to convert to a wide-character string.
	##//string//##
		String expression to convert to a wide-character string.

{{fbdoc item="ret"}}
	Returns the wide-character representation of the numeric or string expression.

{{fbdoc item="desc"}}
	##**Wstr**## converts numeric variables to their wide-character string representation. It is the wide-character equivalent to ##[[KeyPgStr|Str]]##.
	
	##**Wstr**## also converts ASCII character strings to Unicode character strings. If a wide-character string is given, that string is returned unmodified.

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/strings/wstr.bas"}}%%(freebasic)
#if defined( __FB_WIN32__ )
#include "windows.bi"
#endif

Dim zs As ZString * 20
Dim ws As WString * 20

zs = "Hello World"
ws = WStr(zs)

#if defined( __FB_WIN32__ )

MessageBox(null, ws, WStr("Unicode 'Hello World'"), MB_OK Or MB_ICONINFORMATION)

#else

print ws
print WStr("Unicode 'Hello World'")

#endif
%%

{{fbdoc item="target"}}
	- DOS does not support ##**Wstr**##.


{{fbdoc item="lang"}}
	- Not available in the //[[CompilerOptlang|-lang qb]]// dialect unless referenced with the alias ##**""__Wstr""**##.

{{fbdoc item="diff"}}
	- New to ""FreeBASIC""

{{fbdoc item="see"}}
	- ##[[KeyPgStr|Str]]##
	- ##[[KeyPgWstring|Wstring]]##

{{fbdoc item="back" value="CatPgCasting|Converting Data Types"}}{{fbdoc item="back" value="CatPgString|String Functions"}}