Sitecore 5.0 API

StringUtil.Repeat Method 

Repeats a string a number of times.

[Visual Basic]
Public Shared Function Repeat( _
   ByVal s As String, _
   ByVal nCount As Integer _
) As String
[C#]
public static string Repeat(
   string s,
   int nCount
);

Parameters

s
The string to be repeated.
nCount
The number of times the string should be repeated.

Return Value

The string repeated the number of times.

Example

  string text = MainUtil.Repeat("abc", 3); // "abcabcabc"

See Also

StringUtil Class | Sitecore Namespace