Strings.Space(Int32) 메서드
정의
지정한 수 만큼의 공백으로 구성되는 문자열을 반환합니다.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
매개 변수
- Number
- Int32
필수 요소.Required. Integer
식입니다.Integer
expression. 문자열에 넣을 공백의 수입니다.The number of spaces you want in the string.
반환
지정한 수 만큼의 공백으로 구성되는 문자열입니다.A string consisting of the specified number of spaces.
예외
Number
< 0.Number
< 0.
예제
이 예에서는 함수를 사용 하 여 Space
지정 된 수의 공백으로 구성 된 문자열을 반환 합니다.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"
설명
Space
함수는 고정 길이 문자열에서 출력의 서식을 지정 하 고 데이터를 지우는 데 유용 합니다.The Space
function is useful for formatting output and clearing data in fixed-length strings.