CompuServe Messages

#mid$ like function in C

    13-Apr-88 23:08:33
Fm: Vic Wagner 76046,3004
To: Steve Ahlstrom 76703,2006
Well, it's not as easy as it looks. If you're going to make a valid 'C' string out of it, you have to put the trailing '\000' on it. And a proper definition of mid is: char *mid(string, first, length) char *string; unsigned int first, length; So, either you gotta destroy the input string to get the correct terminator on it. Or you gotta allocate some memory to put the newly created string in (who is going to de-allocate it??). This is why most string handling packages in C don't have it.