1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-22 06:00:41 +00:00

even more work on betterComponentsSeparatedByCharactersInSet:

This commit is contained in:
Mitchell Livingston 2011-09-19 02:00:52 +00:00
parent e0278e8d52
commit 3362a73a22

View file

@ -193,17 +193,19 @@
if (range.location != i)
{
NSUInteger length;
if (range.location == NSNotFound)
length = [self length] - i;
{
[components addObject: [self substringFromIndex: i]];
break;
}
else
length = range.location - i;
{
const NSUInteger length = range.location - i;
[components addObject: [self substringWithRange: NSMakeRange(i, length)]];
if (range.location == NSNotFound)
break;
i += length;
}
}
i += range.length;
}