Repeating char array

I'm writing a program in which the user enters text into a char array. I then need to "extend" that text, so that the text is repeated over and over again until the number of chars equal a generic value. Does anyone know of a good way to do that?
while(repStr.length()<genericValue)repStr+=shortStr;
Awesome, thanks;)
Topic archived. No new replies allowed.