/////////////////////////////////////////////////////////// // // list_string.h // // The interface for a linked-list based character // string class. // // Revision history: // 1/3/00 (Jeff Ondich) Created the interface. // // 1/8/03 (JO) Updated slightly--renamed the // class, moved private section to bottom, etc. // /////////////////////////////////////////////////////////// #ifndef LIST_STRING_H #define LIST_STRING_H #include struct ListStringNode { char mData; ListStringNode *mNext; }; class ListString { public: ListString(); ListString( const char *str ); ListString( const ListString& s ); virtual ~ListString(); int Length() const; void MakeUpper(); void MakeLower(); void Reverse(); int Find( char c ) const; int Find( const char *str ) const; int Find( const ListString& s ) const; char& operator[]( int index ); ListString& operator=( const ListString& s ); ListString& operator=( const char *str ); friend ostream& operator<<( ostream&, const ListString& ); friend istream& operator>>( istream&, ListString& ); private: ListStringNode mHead; }; ostream& operator<<( ostream&, const ListString& ); istream& operator>>( istream&, ListString& ); #endif