Strings.Space(Int32) メソッド

定義

指定された数のスペースから成る文字列を返します。

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

パラメーター

Number
Int32

必須です。 Integer 式。 文字列に必要な空白の数。

戻り値

指定された数のスペースから成る文字列です。

例外

Number< 0.

この例では、 関数を Space 使用して、指定した数のスペースで構成される文字列を返します。

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

注釈

関数は Space 、出力の書式設定や固定長文字列のデータの消去に役立ちます。

適用対象

こちらもご覧ください