In the particular case of repeating a single character, you can use std::string(size_type count, CharT ch):
std::string(5, '.') + "lolcat"
This can’t be used to repeat multi-character strings.
In the particular case of repeating a single character, you can use std::string(size_type count, CharT ch):
std::string(5, '.') + "lolcat"
This can’t be used to repeat multi-character strings.