Advertisement
KShah

Untitled

Nov 11th, 2021
888
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String operator+(const char lstr, const String& rstr) {
  2.     String copy(1, lstr);
  3.     copy += rstr;
  4.     return copy;
  5. }
  6.  
  7. String operator+(const String& lstr, const char rstr) {
  8.     String copy = lstr;
  9.     copy.push_back(rstr);
  10.     return copy;
  11. }
  12.  
  13. String operator+(const String& lstr, const String& rstr) {
  14.     String copy = lstr;
  15.     copy += rstr;
  16.     return copy;
  17. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement