Add the left shift operator which shifts the string x


Question: Implement some of the following improvements to the string class.

a. Add ! (which is false if the string is zero length).

b. Add the * and * = operators to expand into multiple copies. For instance, if s is equal to " ab" , then s * =3 turns s into " ababab" .

c. Add the left shift operator, which shifts the string x positions. Can you think of a way to alter the class implementation to make shifting a fast operation?

d. Add lowercase and uppercase member functions.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Add the left shift operator which shifts the string x
Reference No:- TGS02475059

Now Priced at $15 (50% Discount)

Recommended (97%)

Rated (4.9/5)