String operator* - JanKulbaga/String-CPP GitHub Wiki
Returns a newly constructed string object whose value is num times the value of s.
#include <ostream>
#include "src/String.h"
int main()
{
String s = "Hello";
String s1 = s * 3;
std::cout << s1;
return 0;
}Output:
HelloHelloHelloconst String& s
size_t num
A new string whose value is num times the value of s.