home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
POINT Software Programming
/
PPROG1.ISO
/
pascal
/
sweep10
/
string.hpp
< prev
next >
Wrap
Text File
|
1993-04-01
|
910b
|
31 lines
//////////////////
// String Class //
//////////////////
#include "sweep.h"
class String {
HeapHandle han;
public:
String ();
String (char* s);
String (String& s);
~String ();
unsigned Length (void) { return HeapSize(han) - 1; };
char far* Address (void) { return (char far*) HeapAddr (han); };
char operator[] (unsigned i) { return *(Address() + i); };
String& Assign (char *s);
String& Assign (String& s);
String& Prefix (char *s);
String& Prefix (String& s);
String& Suffix (char *s);
String& Suffix (String& s);
String& operator= (char* s) { return Assign (s); };
String& operator= (String& s) { return Assign (s); };
String& operator+ (char* s) { return Suffix (s); };
};
String& operator<< (String& s1, char* s2);
char* operator<< (char* s1, String& s2);
String& operator<< (String& s1, String& s2);