Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -280,11 +280,11 @@ * Splits an OFString into an OFArray of OFStrings. * * \param delimiter The delimiter for splitting * \return An autoreleased OFArray with the splitted string */ -- (OFArray*)splitWithDelimiter: (OFString*)delimiter; +- (OFArray*)componentsSeparatedByString: (OFString*)delimiter; /** * Returns the decimal value of the string as an intmax_t or throws an * OFInvalidEncoding exception if the string contains any non-number characters. * Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -773,11 +773,11 @@ return (memcmp(string + (length - len), [suffix cString], len) ? NO : YES); } -- (OFArray*)splitWithDelimiter: (OFString*)delimiter +- (OFArray*)componentsSeparatedByString: (OFString*)delimiter { OFAutoreleasePool *pool; OFMutableArray *array; const char *delim = [delimiter cString]; size_t delim_len = [delimiter cStringLength]; Index: tests/OFString.m ================================================================== --- tests/OFString.m +++ tests/OFString.m @@ -184,12 +184,12 @@ TEST(@"-[hasSuffix:]", [@"foobar" hasSuffix: @"bar"] && ![@"foobar" hasSuffix: @"foobar0"]) i = 0; - TEST(@"-[splitWithDelimiter:]", - (a = [@"fooXXbarXXXXbazXXXX" splitWithDelimiter: @"XX"]) && + TEST(@"-[componentsSeparatedByString:]", + (a = [@"fooXXbarXXXXbazXXXX" componentsSeparatedByString: @"XX"]) && [[a objectAtIndex: i++] isEqual: @"foo"] && [[a objectAtIndex: i++] isEqual: @"bar"] && [[a objectAtIndex: i++] isEqual: @""] && [[a objectAtIndex: i++] isEqual: @"baz"] && [[a objectAtIndex: i++] isEqual: @""] &&