Help Center
Help CenterFreeBASIC

WSpacefunction

Creates a WString of a given length filled with spaces (" ")

String Functionsfunctiondocumented

Syntax

Declare Function WSpace( ByVal count As Integer ) As WString

Parameters

NameDescription
countAn integer type specifying the length of the string to be created.

Return value


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

Description


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

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


Example


Dim a As WString * 10

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

Print a ' prints: x   x


Reference

  • Documented in KeyPgWspace.html