// StringBuilder.h // // Written 19 Feb 1996 by Max Hailperin . // // Defines interface for a class used to build strings without knowing in // advance how big they are going to wind up being. // (The standard ostrstream class can also be used for this -- this is more // specialized.) #ifndef _STRING_BUILDER_H #define _STRING_BUILDER_H class StringBuilderRep; class StringBuilder{ public: StringBuilder(); ~StringBuilder(); void add(char); char *string(); // returns string built up by adds, clears out to start over private: StringBuilderRep *rep; }; #endif