Home > Language Reference > Functions > Strings

Space Function

Returns a string consisting of the specified number of spaces.

Syntax

Public Function Space(ByVal iCount As Integer) As String

ParameterDescription
iCountNumber of spaces required.

Remarks

If the argument iCount is less than zero, a runtime error occurs.

The function Space is useful for formatting and correctly aligning a string for display purposes or to reserve memory space in a string that will be passed as a parameter to an external C function.

If you want to fill a string with a character other than a space, you should use the function String.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A