quakeforge/ruamoko/scheme/String.r
Brian Koropoff 281b683e14 Initial commit of a future partial implementation of the R5RS Scheme
standard, implemented in Ruamoko.  Currently works for a few simple
"Hello, world!" programs.
2005-05-01 11:48:36 +00:00

35 lines
436 B
R

#include "string.h"
#include "String.h"
@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