Question: Write your own simplified version of the std::string class, with the following specification. Please put the class definition on page 3 , and the implementation

 Write your own simplified version of the std::string class, with the

Write your own simplified version of the std::string class, with the following specification. Please put the class definition on page 3 , and the implementation of the member functions on page 4 . You may use any of the standard C string library functions; you may assume that c cstring > is already included. You may not use the C++ library. Specification: - Class name is MyString. - Must include a default constructor, which initializes to an empty string. - Must include a destructor. - Must include a parameterized constructor, which takes a const char " and copies the string data into the object. - Member functions: empty - returns true if it's an empty string, false if non-empty size - returns the length of the string (does not include the null terminator) contains - takes either a character (char) or a string (const char *), returns true if the character or substring appears anywhere in the string, false otherwise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!