I have the following function that takes a string as parameter and repeats it a number of times (also a parameter). I feel like this is something that's already in the framework or at least could be done better. Any suggestions?
private string chr(string s, int repeat)
{
string result = string.Empty;
for (int i = 0; i < repeat; i++)
{
result += s;
}
return result;
}