2005-05-01 11:48:36 +00:00
|
|
|
#include "string.h"
|
2005-05-08 10:43:56 +00:00
|
|
|
#include "SchemeString.h"
|
2005-05-01 11:48:36 +00:00
|
|
|
|
|
|
|
@implementation String
|
|
|
|
|
|
|
|
+ (id) newFromString: (string) s
|
|
|
|
{
|
|
|
|
return [[self alloc] initWithString: s];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (id) initWithString: (string) s
|
|
|
|
{
|
|
|
|
self = [super init];
|
|
|
|
value = str_new();
|
|
|
|
str_copy(value, s);
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (string) stringValue
|
|
|
|
{
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (string) printForm
|
|
|
|
{
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) dealloc
|
|
|
|
{
|
|
|
|
str_free (value);
|
|
|
|
[super dealloc];
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|