Space Function


Space Function

Class

Microsoft.VisualBasic.Strings

Syntax

     Dim result As String = Space(number) 


number (required; Integer)

The number of spaces required

Description

The Space function creates a string containing number spaces.

Usage at a Glance

  • While number can be zero (in which case, the function returns the empty string), a runtime error occurs if number is negative.

  • One of the custom constructors for the String data type can also be used to create a string of spaces. The following statement creates a new string with 10 spaces.

         Dim blankString As New String(" "c, 10) 

See Also

SPC Function, StrDup Function




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net