String operator plus - JanKulbaga/String-CPP GitHub Wiki
Returns a newly constructed string object with its value being the concatenation of the characters in s1 followed by those of s2.
#include <ostream>
#include "src/String.h"
int main()
{
String s = "Hello ";
String s1 = "World";
String s2 = s + s1;
std::cout << s2;
return 0;
}Output:
Hello Worldconst String& s1
const String& s2
A new string whose value is the concatenation of s1 and s2