@@ -237,18 +237,18 @@ return [super alloc]; } #ifdef OF_HAVE_UNICODE_TABLES -- (void)of_convertWithWordStartTable: (const of_unichar_t *const[])startTable - wordMiddleTable: (const of_unichar_t *const[])middleTable +- (void)of_convertWithWordStartTable: (const of_unichar_t *const [])startTable + wordMiddleTable: (const of_unichar_t *const [])middleTable wordStartTableSize: (size_t)startTableSize wordMiddleTableSize: (size_t)middleTableSize { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = [self characters]; - size_t length = [self length]; + const of_unichar_t *characters = self.characters; + size_t length = self.length; bool isStart = true; for (size_t i = 0; i < length; i++) { const of_unichar_t *const *table; size_t tableSize; @@ -274,12 +274,12 @@ #else - (void)of_convertWithWordStartFunction: (char (*)(char))startFunction wordMiddleFunction: (char (*)(char))middleFunction { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = [self characters]; - size_t length = [self length]; + const of_unichar_t *characters = self.characters; + size_t length = self.length; bool isStart = true; for (size_t i = 0; i < length; i++) { char (*function)(char) = (isStart ? startFunction : middleFunction); @@ -312,11 +312,11 @@ } - (void)appendString: (OFString *)string { [self insertString: string - atIndex: [self length]]; + atIndex: self.length]; } - (void)appendCharacters: (const of_unichar_t *)characters length: (size_t)length { @@ -389,11 +389,11 @@ int UTF8StringLength; if (format == nil) @throw [OFInvalidArgumentException exception]; - if ((UTF8StringLength = of_vasprintf(&UTF8String, [format UTF8String], + if ((UTF8StringLength = of_vasprintf(&UTF8String, format.UTF8String, arguments)) == -1) @throw [OFInvalidFormatException exception]; @try { [self appendUTF8String: UTF8String @@ -409,11 +409,11 @@ atIndex: 0]; } - (void)reverse { - size_t i, j, length = [self length]; + size_t i, j, length = self.length; for (i = 0, j = length - 1; i < length / 2; i++, j--) { of_unichar_t tmp = [self characterAtIndex: j]; [self setCharacter: [self characterAtIndex: i] atIndex: j]; @@ -489,38 +489,38 @@ withString: (OFString *)replacement { [self replaceOccurrencesOfString: string withString: replacement options: 0 - range: of_range(0, [self length])]; + range: of_range(0, self.length)]; } - (void)replaceOccurrencesOfString: (OFString *)string withString: (OFString *)replacement options: (int)options range: (of_range_t)range { void *pool = objc_autoreleasePoolPush(), *pool2; const of_unichar_t *characters; - const of_unichar_t *searchCharacters = [string characters]; - size_t searchLength = [string length]; - size_t replacementLength = [replacement length]; + const of_unichar_t *searchCharacters = string.characters; + size_t searchLength = string.length; + size_t replacementLength = replacement.length; if (string == nil || replacement == nil) @throw [OFInvalidArgumentException exception]; if (range.length > SIZE_MAX - range.location || - range.location + range.length > [self length]) + range.location + range.length > self.length) @throw [OFOutOfRangeException exception]; if (searchLength > range.length) { objc_autoreleasePoolPop(pool); return; } pool2 = objc_autoreleasePoolPush(); - characters = [self characters]; + characters = self.characters; for (size_t i = range.location; i <= range.length - searchLength; i++) { if (memcmp(characters + i, searchCharacters, searchLength * sizeof(of_unichar_t)) != 0) continue; @@ -534,21 +534,21 @@ i += replacementLength - 1; objc_autoreleasePoolPop(pool2); pool2 = objc_autoreleasePoolPush(); - characters = [self characters]; + characters = self.characters; } objc_autoreleasePoolPop(pool); } - (void)deleteLeadingWhitespaces { void *pool = objc_autoreleasePoolPush(); - const of_unichar_t *characters = [self characters]; - size_t i, length = [self length]; + const of_unichar_t *characters = self.characters; + size_t i, length = self.length; for (i = 0; i < length; i++) { of_unichar_t c = characters[i]; if (!of_ascii_isspace(c)) @@ -564,17 +564,17 @@ { void *pool; const of_unichar_t *characters, *p; size_t length, d; - length = [self length]; + length = self.length; if (length == 0) return; pool = objc_autoreleasePoolPush(); - characters = [self characters]; + characters = self.characters; d = 0; for (p = characters + length - 1; p >= characters; p--) { if (!of_ascii_isspace(*p)) break;