This is MyStringSegment.m in view mode; [Download] [Up]
#import "MyStringSegment.h"
@implementation MyStringSegment
- initWith:(const char *)s ofType:(MyStringType)t
{
string = [[NXData alloc] initWithSize:strlen(s)+1];
strcpy([string data],s);
typ = t;
return [super init];
}
- free
{
[string free];
typ = FREE;
return [super free];
}
- copy
{
id new = [super copy];
string = [string copy]; // string auch verdoppeln
return new;
}
- (MyStringType)typ
{
return typ;
}
- (char *)string
{
return (char *)[string data];
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.