1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
|
for (i = 0, last = 0; i <= length - delimiterLength; i++) {
if (memcmp(characters + i, delimiterCharacters,
delimiterLength * sizeof(of_unichar_t)))
continue;
component = [self substringWithRange: of_range(last, i - last)];
if (!skipEmpty || ![component isEqual: @""])
[array addObject: component];
i += delimiterLength - 1;
last = i + 1;
}
component = [self substringWithRange: of_range(last, length - last)];
if (!skipEmpty || ![component isEqual: @""])
[array addObject: component];
[array makeImmutable];
objc_autoreleasePoolPop(pool);
return array;
|
|
|
|
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
|
for (i = 0, last = 0; i <= length - delimiterLength; i++) {
if (memcmp(characters + i, delimiterCharacters,
delimiterLength * sizeof(of_unichar_t)))
continue;
component = [self substringWithRange: of_range(last, i - last)];
if (!skipEmpty || [component length] > 0)
[array addObject: component];
i += delimiterLength - 1;
last = i + 1;
}
component = [self substringWithRange: of_range(last, length - last)];
if (!skipEmpty || [component length] > 0)
[array addObject: component];
[array makeImmutable];
objc_autoreleasePoolPop(pool);
return array;
|