String& operator plusEquals - JanKulbaga/String-CPP GitHub Wiki

String& operator+=

It extends the string by appending additional characters at the end of its current value.

Example

#include <ostream>
#include "src/String.h"

int main()
{
    String s = "Hello ";
    String s1 = "World";
    s += s1;
    std::cout << s;
    return 0;
}

Output:

Hello World

Parameters

const String& other

Return value

*this

⚠️ **GitHub.com Fallback** ⚠️