#include <iostream>
using namespace std;
int main()
{
string newString;
string message("Aloha World!");
cout << message << endl;
char arr[] = {'H', 'e', 'l', 'l', 'o', '\0'};
string st1(arr);
cout << st1 << endl;
string s1("Welcome");
s1.append(" to C++");
cout << s1 << endl;
string s2("Welcome");
s2.append(" to C and C++", 3, 2);
cout << s2 << endl;
string s3("Welcome");
s3.append(" to C and C++",5);
cout << s3 << endl;
string s4("Welcome");
s4.append(4,'G');
cout << s4 << endl;
string s5("Welcome");
s5.assign("Dallas");
cout << s5 << endl;
string s6("Welcome");
s6.assign("Dallas,Texas",1,3);
cout << s6 << endl;
string s7("Welcome");
s7.assign("Dallas,Texas",6);
cout << s7 << endl;
string s8("Welcome");
s8.assign(4,'G');
cout << s8 << endl;
string s9("Welcome");
cout << s9.at(3) << endl;
cout << s9.erase(2,3) << endl;
s9.clear();
cout << s9.empty() << endl;
string s10("Welcome");
string s11("Welcomg");
cout << s10.compare(s11) << endl;
cout << s11.compare(s10) << endl;
cout << s10.compare("Welcome") << endl;
string s12("Welcome");
cout << s12.substr(0,1) << endl;
cout << s12.substr(3) << endl;
cout << s12.substr(3,3) << endl;
string s13("Welcome to HTML");
cout << s13.find("co") << endl;
cout << s13.find("co",6) << endl;
cout << s13.find('o') << endl;
cout << s13.find('o',6) << endl;
string s14("Welcome to HTML");
s14.insert(11,"C++ and ");
cout << s14 << endl;
string s15("AA");
s15.insert(1,4,'B');
cout << s15 << endl;
string s16("Welcome to HTML");
s16.replace(11,4,"C++");
cout << s16 << endl;
return 0;
}