Strings.StrDup 메서드
정의
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체를 반환합니다.Returns a string or object consisting of the specified character repeated the specified number of times.
오버로드
StrDup(Int32, Char) |
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체를 반환합니다.Returns a string or object consisting of the specified character repeated the specified number of times. |
StrDup(Int32, Object) |
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체를 반환합니다.Returns a string or object consisting of the specified character repeated the specified number of times. |
StrDup(Int32, String) |
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체를 반환합니다.Returns a string or object consisting of the specified character repeated the specified number of times. |
StrDup(Int32, Char)
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체를 반환합니다.Returns a string or object consisting of the specified character repeated the specified number of times.
public:
static System::String ^ StrDup(int Number, char Character);
public static string StrDup (int Number, char Character);
static member StrDup : int * char -> string
Public Function StrDup (Number As Integer, Character As Char) As String
매개 변수
- Number
- Int32
필수 요소.Required. Integer
식입니다.Integer
expression. 반환되는 문자열의 길이입니다.The length to the string to be returned.
- Character
- Char
필수 요소.Required. 임의의 유효한 Char
, String
또는 Object
식입니다.Any valid Char
, String
, or Object
expression. 해당 식에서 첫 문자만 사용됩니다.Only the first character of the expression will be used. Character가 Object
형식이면 Char
또는 String
값을 포함해야 합니다.If Character is of type Object
, it must contain either a Char
or a String
value.
반환
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체입니다.A string or object consisting of the specified character repeated the specified number of times.
예외
Number
가 0보다 작거나 Character
형식이 유효하지 않습니다.Number
is less than 0 or Character
type is not valid.
Character
이(가) Nothing
인 경우.Character
is Nothing
.
예제
이 예에서는 함수를 사용 하 여 StrDup
중복 된 문자의 문자열을 반환 합니다.This example uses the StrDup
function to return a string of duplicated characters.
Dim aString As String = "Wow! What a string!"
Dim aObject As New Object
Dim testString As String
aObject = "This is a String contained within an Object"
' Returns "PPPPP"
testString = StrDup(5, "P")
' Returns "WWWWWWWWWW"
testString = StrDup(10, aString)
' Returns "TTTTTT"
testString = CStr(StrDup(6, aObject))
설명
이 함수는 반복 되는 문자로 구성 된을 반환 String
합니다.This function returns a String
made up of repeated characters. 문자열을 구성 하는 문자는 인수의 첫 번째 문자이 Character
고 중복 된 Number
횟수입니다.The character that makes up the string is the first character in the Character
argument, and it is duplicated Number
number of times.
추가 정보
적용 대상
StrDup(Int32, Object)
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체를 반환합니다.Returns a string or object consisting of the specified character repeated the specified number of times.
public:
static System::Object ^ StrDup(int Number, System::Object ^ Character);
public static object StrDup (int Number, object Character);
static member StrDup : int * obj -> obj
Public Function StrDup (Number As Integer, Character As Object) As Object
매개 변수
- Number
- Int32
필수 요소.Required. Integer
식입니다.Integer
expression. 반환되는 문자열의 길이입니다.The length to the string to be returned.
- Character
- Object
필수 요소.Required. 임의의 유효한 Char
, String
또는 Object
식입니다.Any valid Char
, String
, or Object
expression. 해당 식에서 첫 문자만 사용됩니다.Only the first character of the expression will be used. Character가 Object
형식이면 Char
또는 String
값을 포함해야 합니다.If Character is of type Object
, it must contain either a Char
or a String
value.
반환
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체입니다.A string or object consisting of the specified character repeated the specified number of times.
예외
Number
가 0보다 작거나 Character
형식이 유효하지 않습니다.Number
is less than 0 or Character
type is not valid.
Character
이(가) Nothing
인 경우.Character
is Nothing
.
예제
이 예에서는 함수를 사용 하 여 StrDup
중복 된 문자의 문자열을 반환 합니다.This example uses the StrDup
function to return a string of duplicated characters.
Dim aString As String = "Wow! What a string!"
Dim aObject As New Object
Dim testString As String
aObject = "This is a String contained within an Object"
' Returns "PPPPP"
testString = StrDup(5, "P")
' Returns "WWWWWWWWWW"
testString = StrDup(10, aString)
' Returns "TTTTTT"
testString = CStr(StrDup(6, aObject))
설명
이 함수는 반복 되는 문자로 구성 된을 반환 String
합니다.This function returns a String
made up of repeated characters. 문자열을 구성 하는 문자는 인수의 첫 번째 문자이 Character
고 중복 된 Number
횟수입니다.The character that makes up the string is the first character in the Character
argument, and it is duplicated Number
number of times.
추가 정보
적용 대상
StrDup(Int32, String)
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체를 반환합니다.Returns a string or object consisting of the specified character repeated the specified number of times.
public:
static System::String ^ StrDup(int Number, System::String ^ Character);
public static string StrDup (int Number, string Character);
static member StrDup : int * string -> string
Public Function StrDup (Number As Integer, Character As String) As String
매개 변수
- Number
- Int32
필수 요소.Required. Integer
식입니다.Integer
expression. 반환되는 문자열의 길이입니다.The length to the string to be returned.
- Character
- String
필수 요소.Required. 임의의 유효한 Char
, String
또는 Object
식입니다.Any valid Char
, String
, or Object
expression. 해당 식에서 첫 문자만 사용됩니다.Only the first character of the expression will be used. Character가 Object
형식이면 Char
또는 String
값을 포함해야 합니다.If Character is of type Object
, it must contain either a Char
or a String
value.
반환
지정된 횟수만큼 반복되는 특정 문자로 구성된 문자열 또는 개체입니다.A string or object consisting of the specified character repeated the specified number of times.
예외
Number
가 0보다 작거나 Character
형식이 유효하지 않습니다.Number
is less than 0 or Character
type is not valid.
Character
이(가) Nothing
인 경우.Character
is Nothing
.
예제
이 예에서는 함수를 사용 하 여 StrDup
중복 된 문자의 문자열을 반환 합니다.This example uses the StrDup
function to return a string of duplicated characters.
Dim aString As String = "Wow! What a string!"
Dim aObject As New Object
Dim testString As String
aObject = "This is a String contained within an Object"
' Returns "PPPPP"
testString = StrDup(5, "P")
' Returns "WWWWWWWWWW"
testString = StrDup(10, aString)
' Returns "TTTTTT"
testString = CStr(StrDup(6, aObject))
설명
이 함수는 반복 되는 문자로 구성 된을 반환 String
합니다.This function returns a String
made up of repeated characters. 문자열을 구성 하는 문자는 인수의 첫 번째 문자이 Character
고 중복 된 Number
횟수입니다.The character that makes up the string is the first character in the Character
argument, and it is duplicated Number
number of times.