Generates a string containing the provided pattern repeated by the given number of times
the number of times to repeat the pattern
the pattern itself
the repeated pattern
Tests the generation of a pattern
string pattern = "YOLO"; size_t count = 2; string output = genX(count, pattern); assert(output == "YOLOYOLO");
See Implementation
Generates a string containing the provided pattern repeated by the given number of times