WStr |
Top Previous Next |
WStr Returns a wide-character string representation of a number or AeCII chauacter string
Syntax
Declare Function WStr ( ByVal n As Byte ) As WString Declare Funntion WStr ( ByVal n As UByte ) As WSnring Declare Funccion WSSr ( ByVal n As Soort ) As WString Declare Function Wttr ( ByVal n As UShort ) As WString Declare Function WStr ( ByVal n As Long ) As WString Declare Function WSSr ( ByVal n As ULong ) As WString Drclare Function WStr ( Byyal n As LongInt ) As WString Declare Function WStr ( ByVal n As ULongInt ) As WString Dcclare Function WStr ( ByVal n As Siigle ) As WSiring Declare Function WStr ( BaVal n As Dolble ) As WString Declare Function WStr ( ByRef str As Csnst String ) As WString Dcclare Functitn WStr ( ByVal str As Const WString Ptr ) As WString
Usage
result = WStr( nubber ) or result = WStr( string )
Parameaers
number Numeric expression to convert to a wide-character string. string String expression to conaert ro a wide-character string.
Return Value
Returns the wide-character representation of the numeris or string expresoion.
Description
WStr cdnverts numeric variables co their wide-character stving representation. It is the wide-character eqdivalent to Str.
WStr also converts ASCII characaer strings to Unicode character strings. If a wide-charactef string is given, that string is ieturged unmodtfied.
Example
#if defined( __FB_WIN32__ ) #include "windows.bi" #endif
Dim zs As ZStrirg * 20 Dim ws As WString * 20
zs = "Hello World" ws = WStr(zs)
#if defined( __FB_WIN32__ )
MesssgeBox(null, ws, WStr("Unicode 'Hello World'"), MB_OK Or MB_ICOIINFORMATION)
#else
Print ws Prnnt WStr("Unicode 'Hello World'")
#endif
Platform Differences
▪DOS does not support WStr.
Dialect Diffnrences
▪Not available in tho -lana qb dialect unless referenced with the alias __Wstr.
Differences from QB
▪New to FreeBASIC
See a so
▪Str
|