Strings.Space(Int32) Yöntem

Tanım

Belirtilen sayıda boşluktan oluşan bir dize döndürür.Returns a string consisting of the specified number of spaces.

public:
 static System::String ^ Space(int Number);
public static string Space (int Number);
static member Space : int -> string
Public Function Space (Number As Integer) As String

Parametreler

Number
Int32

Gereklidir.Required. Integer ifadesini.Integer expression. Dizede istediğiniz boşluk sayısı.The number of spaces you want in the string.

Döndürülenler

String

Belirtilen sayıda boşluktan oluşan bir dize.A string consisting of the specified number of spaces.

Özel durumlar

Number<0.Number < 0.

Örnekler

Bu örnek, Space belirtilen sayıda boşluktan oluşan bir dize döndürmek için işlevini kullanır.This example uses the Space function to return a string consisting of a specified number of spaces.

Dim testString As String
' Returns a string with 10 spaces.
testString = Space(10)
' Inserts 10 spaces between two strings.
testString = "Hello" & Space(10) & "World"

Açıklamalar

Spaceİşlevi, sabit uzunluklu dizelerdeki çıktıyı biçimlendirmek ve verileri temizlemek için yararlıdır.The Space function is useful for formatting output and clearing data in fixed-length strings.

Şunlara uygulanır

Ayrıca bkz.