@@ -85,39 +85,39 @@ [self release]; @throw [OFNotImplementedException newWithClass: c selector: _cmd]; } -- initWithCString: (const char*)str -{ - Class c = isa; - [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; -} - -- initWithCString: (const char*)str - encoding: (of_string_encoding_t)encoding -{ - Class c = isa; - [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; -} - -- initWithCString: (const char*)str - encoding: (of_string_encoding_t)encoding - length: (size_t)len -{ - Class c = isa; - [self release]; - @throw [OFNotImplementedException newWithClass: c - selector: _cmd]; -} - -- initWithCString: (const char*)str - length: (size_t)len +- initWithUTF8String: (const char*)UTF8String +{ + Class c = isa; + [self release]; + @throw [OFNotImplementedException newWithClass: c + selector: _cmd]; +} + +- initWithUTF8String: (const char*)UTF8String + length: (size_t)UTF8StringLength +{ + Class c = isa; + [self release]; + @throw [OFNotImplementedException newWithClass: c + selector: _cmd]; +} + +- initWithCString: (const char*)cString + encoding: (of_string_encoding_t)encoding +{ + Class c = isa; + [self release]; + @throw [OFNotImplementedException newWithClass: c + selector: _cmd]; +} + +- initWithCString: (const char*)cString + encoding: (of_string_encoding_t)encoding + length: (size_t)cStringLength { Class c = isa; [self release]; @throw [OFNotImplementedException newWithClass: c selector: _cmd]; @@ -403,16 +403,24 @@ return [super description]; } /* From OFString */ -- (const char*)cString +- (const char*)UTF8String +{ + if (initialized != SIZE_MAX) + [self finishInitialization]; + + return [super UTF8String]; +} + +- (const char*)cStringWithEncoding: (of_string_encoding_t)encoding { if (initialized != SIZE_MAX) [self finishInitialization]; - return [super cString]; + return [super cStringWithEncoding: encoding]; } - (size_t)length { if (initialized != SIZE_MAX) @@ -419,16 +427,24 @@ [self finishInitialization]; return [super length]; } -- (size_t)cStringLength +- (size_t)UTF8StringLength +{ + if (initialized != SIZE_MAX) + [self finishInitialization]; + + return [super UTF8StringLength]; +} + +- (size_t)cStringLengthWithEncoding: (of_string_encoding_t)encoding { if (initialized != SIZE_MAX) [self finishInitialization]; - return [super cStringLength]; + return [super cStringLengthWithEncoding: encoding]; } - (of_comparison_result_t)caseInsensitiveCompare: (OFString*)otherString { if (initialized != SIZE_MAX)