Skip to content
Paul Squires edited this page Oct 19, 2026 · 2 revisions

Home › String Functions › WSpace

WSpace

Returns a wide string of n spaces.

Syntax

Declare Function WSpace( ByVal count As Integer ) As WString

Parameters

  • count

Description

WSpace creates a wstring (wide character string- Unicode) with the specified number of spaces.

Return Value

The created WString. An empty string will be returned if count <= 0.

Remarks

Usage

result = WSpace( count )

Platform Differences

  • Unicode strings are not supported in the DOS port of FreeBASIC.

Dialect Differences

  • Not available in the -lang qb dialect unless referenced with the alias __Wspace.

Differences from QB

  • New to FreeBASIC

See also

Examples

Dim a As WString * 10

a = "x" + WSpace(3) + "x"

Print a ' prints: x   x

Category: String Functions
Kind: function


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally