HTML & JS
#include <iostream> 
#include <string> 
using namespace std; 

int main() 
{ 
	string str1("Geeks"); 
	string str2("tocode"); 

	cout << "Without Append " << str1 << endl; 
	
    str1.append(str2, 0, 5); 
	cout << "After Using append() : "; 
	cout << str1; 

	return 0; 
} 

Generated URL:

Output:

Without Append Geeks
After Using append() : Geekstocod
Report Bug