@@ -39,11 +39,11 @@ { if (self == [OFMutableString_UTF8 class]) [self inheritMethodsFromClass: [OFString_UTF8 class]]; } -- initWithUTF8StringNoCopy: (char*)UTF8String +- initWithUTF8StringNoCopy: (char *)UTF8String freeWhenDone: (bool)freeWhenDone { @try { self = [self initWithUTF8String: UTF8String]; } @finally { @@ -269,11 +269,11 @@ /* We don't really care, as we only made it smaller */ } } } -- (void)appendUTF8String: (const char*)UTF8String +- (void)appendUTF8String: (const char *)UTF8String { size_t UTF8StringLength = strlen(UTF8String); size_t length; if (UTF8StringLength >= 3 && @@ -299,11 +299,11 @@ _s->cStringLength += UTF8StringLength; _s->length += length; } -- (void)appendUTF8String: (const char*)UTF8String +- (void)appendUTF8String: (const char *)UTF8String length: (size_t)UTF8StringLength { size_t length; if (UTF8StringLength >= 3 && @@ -330,19 +330,19 @@ _s->length += length; _s->cString[_s->cStringLength] = 0; } -- (void)appendCString: (const char*)cString +- (void)appendCString: (const char *)cString encoding: (of_string_encoding_t)encoding { [self appendCString: cString encoding: encoding length: strlen(cString)]; } -- (void)appendCString: (const char*)cString +- (void)appendCString: (const char *)cString encoding: (of_string_encoding_t)encoding length: (size_t)cStringLength { if (encoding == OF_STRING_ENCODING_UTF_8) [self appendUTF8String: cString @@ -357,11 +357,11 @@ objc_autoreleasePoolPop(pool); } } -- (void)appendString: (OFString*)string +- (void)appendString: (OFString *)string { size_t UTF8StringLength; if (string == nil) @throw [OFInvalidArgumentException exception]; @@ -380,17 +380,17 @@ _s->cString[_s->cStringLength] = 0; if ([string isKindOfClass: [OFString_UTF8 class]] || [string isKindOfClass: [OFMutableString_UTF8 class]]) { - if (((OFString_UTF8*)string)->_s->isUTF8) + if (((OFString_UTF8 *)string)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; } -- (void)appendCharacters: (const of_unichar_t*)characters +- (void)appendCharacters: (const of_unichar_t *)characters length: (size_t)length { char *tmp; tmp = [self allocMemoryWithSize: (length * 4) + 1]; @@ -426,11 +426,11 @@ } @finally { [self freeMemory: tmp]; } } -- (void)appendFormat: (OFConstantString*)format +- (void)appendFormat: (OFConstantString *)format arguments: (va_list)arguments { char *UTF8String; int UTF8StringLength; @@ -527,11 +527,11 @@ /* UTF-8 does not allow more than 4 bytes per character */ @throw [OFInvalidEncodingException exception]; } } -- (void)insertString: (OFString*)string +- (void)insertString: (OFString *)string atIndex: (size_t)index { size_t newCStringLength; if (index > _s->length) @@ -555,11 +555,11 @@ _s->cStringLength = newCStringLength; _s->length += [string length]; if ([string isKindOfClass: [OFString_UTF8 class]] || [string isKindOfClass: [OFMutableString_UTF8 class]]) { - if (((OFString_UTF8*)string)->_s->isUTF8) + if (((OFString_UTF8 *)string)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; } @@ -592,11 +592,11 @@ /* We don't really care, as we only made it smaller */ } } - (void)replaceCharactersInRange: (of_range_t)range - withString: (OFString*)replacement + withString: (OFString *)replacement { size_t start = range.location; size_t end = range.location + range.length; size_t newCStringLength, newLength; @@ -648,18 +648,18 @@ _s->cStringLength = newCStringLength; _s->length = newLength; if ([replacement isKindOfClass: [OFString_UTF8 class]] || [replacement isKindOfClass: [OFMutableString_UTF8 class]]) { - if (((OFString_UTF8*)replacement)->_s->isUTF8) + if (((OFString_UTF8 *)replacement)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; } -- (void)replaceOccurrencesOfString: (OFString*)string - withString: (OFString*)replacement +- (void)replaceOccurrencesOfString: (OFString *)string + withString: (OFString *)replacement options: (int)options range: (of_range_t)range { const char *searchString = [string UTF8String]; const char *replacementString = [replacement UTF8String]; @@ -735,11 +735,11 @@ _s->cStringLength = newCStringLength; _s->length = newLength; if ([replacement isKindOfClass: [OFString_UTF8 class]] || [replacement isKindOfClass: [OFMutableString_UTF8 class]]) { - if (((OFString_UTF8*)replacement)->_s->isUTF8) + if (((OFString_UTF8 *)replacement)->_s->isUTF8) _s->isUTF8 = true; } else _s->isUTF8 = true; }