1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-21 05:36:54 +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,16 +193,18 @@
if (range.location != i)
{
NSUInteger length;
if (range.location == NSNotFound)
length = [self length] - i;
else
length = range.location - i;
[components addObject: [self substringWithRange: NSMakeRange(i, length)]];
if (range.location == NSNotFound)
{
[components addObject: [self substringFromIndex: i]];
break;
i += length;
}
else
{
const NSUInteger length = range.location - i;
[components addObject: [self substringWithRange: NSMakeRange(i, length)]];
i += length;
}
}
i += range.length;
}