Wstring (Function)
Fills a wstring with a certain length of a certain wide character
Syntax
`
Declare Function WString ( ByVal count As Integer, ByVal ch_code As Integer ) As WString
Declare Function WString ( ByVal count As Integer, ByRef ch As Const WString ) As WString
`
Usage
`
result = WString( count, ch_code )
or
result = WString( count, ch )
`
Parameters
`count`
An integer specifying the length of the wstring to be created.
`ch_code`
An integer specifying the Unicode char to be used to fill the wstring.
`ch`
A wstring whose first character is to be used to fill the wstring.
Return Value
The created wstring. An empty wstring will be returned if either `ch` is an empty string, or `count` <= 0.
Description
`WString` generates a temporal wstring filled with `count` copies of an Unicode character. This string can be printed or assigned to a previously `Dim`ed `WString`.
Example
`
Print WString( 4, 934 )
Print WString( 5, WStr("Indeed") )
End 0
`

ΦΦΦΦ IIIII

Platform Differences

- Unicode (w)strings are not supported in the DOS port of FreeBASIC

Dialect Differences

- Not available in the -lang qb dialect unless referenced with the alias `__Wstring`.

Differences from QB

- QBasic does not support Unicode

See also

- `String (data type)`
- `WSpace`
- `WString (data type)`