optimisations

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4233 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-05-10 06:35:41 +00:00
parent c71e8c0524
commit 8500c95ee2
5 changed files with 52 additions and 10 deletions

View file

@ -369,6 +369,25 @@
return result;
}
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned)anIndex
{
unsigned start;
unsigned end;
if (anIndex >= _count)
[NSException raise: NSRangeException format:@"Invalid location."];
start = anIndex;
while (uni_isnonsp(_contents_chars[start]) && start > 0)
start--;
end = start + 1;
if (end < _count)
while ((end < _count) && (uni_isnonsp(_contents_chars[end])) )
end++;
return NSMakeRange(start, end-start);
}
@end