Now welcome to the future. The modern C++ provides a human way of manipulating string. We considered string as a container, as a data type just as int
.
Now we can construct string, and assigned it again and again.
We can get the length of string by member function size()
as all the containers do.
We can use <
operator to do the comparsion with the same function of strcmp
.
We can use +
operator to do the concatenation.
We can use member function find
to find the occurance of substring.