mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +00:00
Revert bogus change ... avoid code duplication.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30598 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ca19318055
commit
04f3016872
1 changed files with 4 additions and 25 deletions
|
@ -2175,33 +2175,12 @@ handle_printf_atsign (FILE *stream,
|
|||
*/
|
||||
- (BOOL) isEqualToString: (NSString*)aString
|
||||
{
|
||||
NSUInteger len;
|
||||
unichar selfBuffer[32];
|
||||
unichar otherBuffer[32];
|
||||
NSRange r = {0, 32};
|
||||
|
||||
if ([self hash] != [aString hash])
|
||||
return NO;
|
||||
|
||||
len = [self length];
|
||||
if (len != [aString length])
|
||||
return NO;
|
||||
|
||||
while (r.location < len)
|
||||
{
|
||||
if (r.location + r.length > len)
|
||||
{
|
||||
r.length = len - r.location;
|
||||
}
|
||||
[self getCharacters: selfBuffer range: r];
|
||||
[aString getCharacters: otherBuffer range: r];
|
||||
if (memcmp(selfBuffer, otherBuffer, r.length) != 0)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
r.location += r.length;
|
||||
}
|
||||
return YES;
|
||||
if (strCompNsNs(self, aString, 0, (NSRange){0, [self length]})
|
||||
== NSOrderedSame)
|
||||
return YES;
|
||||
return NO;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue