 | StringExtensionsRepeat Method (String, Int32, String) |
Repeats the specified string a number of times, each
instance separated by the separator string
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static string Repeat(
this string value,
int numberOfRepetitions,
string separator
)
<ExtensionAttribute>
Public Shared Function Repeat (
value As String,
numberOfRepetitions As Integer,
separator As String
) As String
public:
[ExtensionAttribute]
static String^ Repeat(
String^ value,
int numberOfRepetitions,
String^ separator
)
[<ExtensionAttribute>]
static member Repeat :
value : string *
numberOfRepetitions : int *
separator : string -> string
Parameters
- value
- Type: SystemString
The string to be repeated - numberOfRepetitions
- Type: SystemInt32
The number of times to repeat the string - separator
- Type: SystemString
The string to be placed in between instances of the
original value in the output
Return Value
Type:
StringA string that represents the original string repeated the
proper number of times, separated by the separator string
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also