#include <iostream>
#include <string>
Go to the source code of this file.
◆ main()
Definition at line 5 of file string_op.cpp.
6{
7
8 string firstName = "Alan";
9 string name = firstName + " Turing";
10 string str1 = "It is sunny. ";
11 string str2 = "";
12 string str3 = "C++ programming.";
13 string str4 = firstName + " is taking " + str3;
14
15 cout << str1.empty() << endl;
16 cout << str2.empty() << endl;
17 str3.erase(11,4);
18 cout << str3 << endl;
19 cout << firstName.length() << endl;
20 cout << name.length() << endl;
21 cout << str4 << endl;
22
23 return 0;
24}