From 84e793a061f618e98904b8fc77dfa5139b140b78 Mon Sep 17 00:00:00 2001 From: mccallum Date: Sat, 3 May 1997 20:39:07 +0000 Subject: [PATCH] Remove some duplicate methods. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2324 72102866-910b-0410-8b05-ffd578937521 --- Source/NSString.m | 60 ++++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/Source/NSString.m b/Source/NSString.m index 54fd11c9e..18e4452d5 100644 --- a/Source/NSString.m +++ b/Source/NSString.m @@ -214,12 +214,6 @@ handle_printf_atsign (FILE *stream, // Creating Temporary Strings -+ (NSString*) localizedStringWithFormat: (NSString*) format, ... -{ - [self notImplemented:_cmd]; - return self; -} - + (NSString*) string { return [[[self alloc] init] autorelease]; @@ -253,12 +247,6 @@ handle_printf_atsign (FILE *stream, initWithContentsOfFile: path] autorelease]; } -+ (NSString*) stringWithCString: (const char*) byteString -{ - return [[[self alloc] initWithCString:byteString] - autorelease]; -} - + (NSString*) stringWithFormat: (NSString*)format,... { va_list ap; @@ -673,27 +661,27 @@ handle_printf_atsign (FILE *stream, strFirstCharacter = [aString characterAtIndex:0]; - for (;;) - { - unsigned int i = 1; - unichar myCharacter = [self characterAtIndex:myIndex]; - unichar strCharacter = strFirstCharacter; + for (;;) + { + unsigned int i = 1; + unichar myCharacter = [self characterAtIndex:myIndex]; + unichar strCharacter = strFirstCharacter; - for (;;) - { - if ((myCharacter != strCharacter) && - ((uni_tolower (myCharacter) != uni_tolower (strCharacter)))) - break; - if (i == strLength) - return (NSRange){myIndex, strLength}; - myCharacter = [self characterAtIndex:myIndex + i]; - strCharacter = [aString characterAtIndex:i]; - i++; - } - if (myIndex == myEndIndex) - break; - myIndex ++; - } + for (;;) + { + if ((myCharacter != strCharacter) && + ((uni_tolower (myCharacter) != uni_tolower (strCharacter)))) + break; + if (i == strLength) + return (NSRange){myIndex, strLength}; + myCharacter = [self characterAtIndex:myIndex + i]; + strCharacter = [aString characterAtIndex:i]; + i++; + } + if (myIndex == myEndIndex) + break; + myIndex ++; + } return (NSRange){0, 0}; } @@ -1462,14 +1450,6 @@ else #endif } -- (BOOL) writeToFile: (NSString*)filename - atomically: (BOOL)useAuxiliaryFile -{ - [self notImplemented:_cmd]; - return NO; -} - - // Getting C Strings