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関数は、出力の書式設定や固定長文字列のデータのクリアに役立ちます。

適用対象

こちらもご覧ください