adsfa

adsfa

  • NA
  • 11
  • 0

string multiply

Dec 30 2009 6:16 AM
Hi
i have a function that multiplies a string n times.
the function is :
 string Multiply(string input, int times)
        {
            StringBuilder sb = new StringBuilder(input.Length * times);
            for (int i = 0; i < times; i++)
            {
               
                sb.Append(input);

            }
            return sb.ToString();

        }

i would like to ask if there is any way to leave a blank space in the string
that i will multiply  but without count it as the lenght of the word.

thanks .




Answers (13)