//
// append a nul-terminated string to a str
//
void str::cat(const char *s)
{
size_t n = len + strlen(s) + 1;
char *p = strcpy(new char[len], ptr);
strcat(p, s);
delete [] ptr;
ptr = p;
len = n - 1; // the - 1 was missing
}
//
// append a str to a str
//
void str::cat(const str &s)
{
size_t n = len + s.len + 1;
char *p = strcpy(new char[len], ptr);
strcat(p, s.ptr);
delete [] ptr;
ptr = p;
len = n - 1; // the - 1 was missing
}
// End of File