mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Moved non-OpenStep methods aside, put some under STRICT_OPENSTEP,
others under NO_GNUSTEP. Reordered declarations to match. [NSString -_cStringContents]: Method removed. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1954 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
630e258c7a
commit
cdd4c88577
1 changed files with 37 additions and 62 deletions
|
@ -61,69 +61,54 @@ typedef enum _NSStringEncoding
|
||||||
@protocol NSString <NSCoding, NSCopying, NSMutableCopying>
|
@protocol NSString <NSCoding, NSCopying, NSMutableCopying>
|
||||||
|
|
||||||
// Creating Temporary Strings
|
// Creating Temporary Strings
|
||||||
|
|
||||||
+ (NSString*) localizedStringWithFormat: (NSString*) format, ...;
|
|
||||||
+ (NSString*) stringWithCString: (const char*) byteString;
|
|
||||||
+ (NSString*) stringWithCString: (const char*)byteString
|
|
||||||
length: (unsigned int)length;
|
|
||||||
+ (NSString*) stringWithCharacters: (const unichar*)chars
|
+ (NSString*) stringWithCharacters: (const unichar*)chars
|
||||||
length: (unsigned int)length;
|
length: (unsigned int)length;
|
||||||
|
+ (NSString*) stringWithCString: (const char*)byteString
|
||||||
|
length: (unsigned int)length;
|
||||||
|
+ (NSString*) stringWithCString: (const char*) byteString;
|
||||||
+ (NSString*) stringWithFormat: (NSString*)format,...;
|
+ (NSString*) stringWithFormat: (NSString*)format,...;
|
||||||
+ (NSString*) stringWithFormat: (NSString*)format
|
|
||||||
arguments: (va_list)argList;
|
|
||||||
|
|
||||||
// Initializing Newly Allocated Strings
|
// Initializing Newly Allocated Strings
|
||||||
|
- (id) initWithCharactersNoCopy: (unichar*)chars
|
||||||
- (id) init;
|
|
||||||
- (id) initWithCString: (const char*)byteString;
|
|
||||||
- (id) initWithCString: (const char*)byteString
|
|
||||||
length: (unsigned int)length;
|
|
||||||
- (id) initWithCStringNoCopy: (char*)byteString
|
|
||||||
length: (unsigned int)length
|
length: (unsigned int)length
|
||||||
freeWhenDone: (BOOL)flag;
|
freeWhenDone: (BOOL)flag;
|
||||||
- (id) initWithCharacters: (const unichar*)chars
|
- (id) initWithCharacters: (const unichar*)chars
|
||||||
length: (unsigned int)length;
|
length: (unsigned int)length;
|
||||||
- (id) initWithCharactersNoCopy: (unichar*)chars
|
- (id) initWithCStringNoCopy: (char*)byteString
|
||||||
length: (unsigned int)length
|
length: (unsigned int)length
|
||||||
freeWhenDone: (BOOL)flag;
|
freeWhenDone: (BOOL)flag;
|
||||||
- (id) initWithContentsOfFile: (NSString*)path;
|
- (id) initWithCString: (const char*)byteString
|
||||||
- (id) initWithData: (NSData*)data
|
length: (unsigned int)length;
|
||||||
encoding: (NSStringEncoding)encoding;
|
- (id) initWithCString: (const char*)byteString;
|
||||||
|
- (id) initWithString: (NSString*)string;
|
||||||
- (id) initWithFormat: (NSString*)format,...;
|
- (id) initWithFormat: (NSString*)format,...;
|
||||||
- (id) initWithFormat: (NSString*)format
|
- (id) initWithFormat: (NSString*)format
|
||||||
arguments: (va_list)argList;
|
arguments: (va_list)argList;
|
||||||
- (id) initWithFormat: (NSString*)format
|
- (id) initWithData: (NSData*)data
|
||||||
locale: (NSDictionary*)dictionary;
|
encoding: (NSStringEncoding)encoding;
|
||||||
- (id) initWithFormat: (NSString*)format
|
- (id) initWithContentsOfFile: (NSString*)path;
|
||||||
locale: (NSDictionary*)dictionary
|
- (id) init;
|
||||||
arguments: (va_list)argList;
|
|
||||||
- (id) initWithString: (NSString*)string;
|
|
||||||
|
|
||||||
// Getting a String's Length
|
// Getting a String's Length
|
||||||
|
|
||||||
- (unsigned int) length;
|
- (unsigned int) length;
|
||||||
|
|
||||||
// Accessing Characters
|
// Accessing Characters
|
||||||
|
|
||||||
- (unichar) characterAtIndex: (unsigned int)index;
|
- (unichar) characterAtIndex: (unsigned int)index;
|
||||||
- (void) getCharacters: (unichar*)buffer;
|
- (void) getCharacters: (unichar*)buffer;
|
||||||
- (void) getCharacters: (unichar*)buffer
|
- (void) getCharacters: (unichar*)buffer
|
||||||
range: (NSRange)aRange;
|
range: (NSRange)aRange;
|
||||||
|
|
||||||
// Combining Strings
|
// Combining Strings
|
||||||
|
|
||||||
- (NSString*) stringByAppendingFormat: (NSString*)format,...;
|
- (NSString*) stringByAppendingFormat: (NSString*)format,...;
|
||||||
- (NSString*) stringByAppendingString: (NSString*)aString;
|
- (NSString*) stringByAppendingString: (NSString*)aString;
|
||||||
|
|
||||||
// Dividing Strings into Substrings
|
// Dividing Strings into Substrings
|
||||||
|
|
||||||
- (NSArray*) componentsSeparatedByString: (NSString*)separator;
|
- (NSArray*) componentsSeparatedByString: (NSString*)separator;
|
||||||
- (NSString*) substringFromIndex: (unsigned int)index;
|
- (NSString*) substringFromIndex: (unsigned int)index;
|
||||||
- (NSString*) substringFromRange: (NSRange)aRange;
|
- (NSString*) substringFromRange: (NSRange)aRange;
|
||||||
- (NSString*) substringToIndex: (unsigned int)index;
|
- (NSString*) substringToIndex: (unsigned int)index;
|
||||||
|
|
||||||
// Finding Ranges of Characters and Substrings
|
// Finding Ranges of Characters and Substrings
|
||||||
|
|
||||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet;
|
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet;
|
||||||
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet
|
- (NSRange) rangeOfCharacterFromSet: (NSCharacterSet*)aSet
|
||||||
options: (unsigned int)mask;
|
options: (unsigned int)mask;
|
||||||
|
@ -138,12 +123,13 @@ typedef enum _NSStringEncoding
|
||||||
range: (NSRange)aRange;
|
range: (NSRange)aRange;
|
||||||
|
|
||||||
// Determining Composed Character Sequences
|
// Determining Composed Character Sequences
|
||||||
|
|
||||||
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned int)anIndex;
|
- (NSRange) rangeOfComposedCharacterSequenceAtIndex: (unsigned int)anIndex;
|
||||||
|
|
||||||
// Identifying and Comparing Strings
|
// Converting String Contents into a Property List
|
||||||
|
- (id)propertyList;
|
||||||
|
- (NSDictionary*) propertyListFromStringsFileFormat;
|
||||||
|
|
||||||
- (NSComparisonResult) caseInsensitiveCompare: (NSString*)aString;
|
// Identifying and Comparing Strings
|
||||||
- (NSComparisonResult) compare: (NSString*)aString;
|
- (NSComparisonResult) compare: (NSString*)aString;
|
||||||
- (NSComparisonResult) compare: (NSString*)aString
|
- (NSComparisonResult) compare: (NSString*)aString
|
||||||
options: (unsigned int)mask;
|
options: (unsigned int)mask;
|
||||||
|
@ -152,29 +138,20 @@ typedef enum _NSStringEncoding
|
||||||
range: (NSRange)aRange;
|
range: (NSRange)aRange;
|
||||||
- (BOOL) hasPrefix: (NSString*)aString;
|
- (BOOL) hasPrefix: (NSString*)aString;
|
||||||
- (BOOL) hasSuffix: (NSString*)aString;
|
- (BOOL) hasSuffix: (NSString*)aString;
|
||||||
- (unsigned int) hash;
|
|
||||||
- (BOOL) isEqual: (id)anObject;
|
- (BOOL) isEqual: (id)anObject;
|
||||||
- (BOOL) isEqualToString: (NSString*)aString;
|
- (BOOL) isEqualToString: (NSString*)aString;
|
||||||
|
- (unsigned int) hash;
|
||||||
// Storing the String
|
|
||||||
|
|
||||||
- (NSString*) description;
|
|
||||||
- (BOOL) writeToFile: (NSString*)filename
|
|
||||||
atomically: (BOOL)useAuxiliaryFile;
|
|
||||||
|
|
||||||
// Getting a Shared Prefix
|
// Getting a Shared Prefix
|
||||||
|
|
||||||
- (NSString*) commonPrefixWithString: (NSString*)aString
|
- (NSString*) commonPrefixWithString: (NSString*)aString
|
||||||
options: (unsigned int)mask;
|
options: (unsigned int)mask;
|
||||||
|
|
||||||
// Changing Case
|
// Changing Case
|
||||||
|
|
||||||
- (NSString*) capitalizedString;
|
- (NSString*) capitalizedString;
|
||||||
- (NSString*) lowercaseString;
|
- (NSString*) lowercaseString;
|
||||||
- (NSString*) uppercaseString;
|
- (NSString*) uppercaseString;
|
||||||
|
|
||||||
// Getting C Strings
|
// Getting C Strings
|
||||||
|
|
||||||
- (const char*) cString;
|
- (const char*) cString;
|
||||||
- (unsigned int) cStringLength;
|
- (unsigned int) cStringLength;
|
||||||
- (void) getCString: (char*)buffer;
|
- (void) getCString: (char*)buffer;
|
||||||
|
@ -186,28 +163,20 @@ typedef enum _NSStringEncoding
|
||||||
remainingRange: (NSRange*)leftoverRange;
|
remainingRange: (NSRange*)leftoverRange;
|
||||||
|
|
||||||
// Getting Numeric Values
|
// Getting Numeric Values
|
||||||
|
|
||||||
- (double) doubleValue;
|
|
||||||
- (float) floatValue;
|
- (float) floatValue;
|
||||||
- (int) intValue;
|
- (int) intValue;
|
||||||
|
|
||||||
// Working With Encodings
|
// Working With Encodings
|
||||||
|
|
||||||
+ (NSStringEncoding) defaultCStringEncoding;
|
|
||||||
- (BOOL) canBeConvertedToEncoding: (NSStringEncoding)encoding;
|
- (BOOL) canBeConvertedToEncoding: (NSStringEncoding)encoding;
|
||||||
- (NSData*) dataUsingEncoding: (NSStringEncoding)encoding;
|
- (NSData*) dataUsingEncoding: (NSStringEncoding)encoding;
|
||||||
- (NSData*) dataUsingEncoding: (NSStringEncoding)encoding
|
- (NSData*) dataUsingEncoding: (NSStringEncoding)encoding
|
||||||
allowLossyConversion: (BOOL)flag;
|
allowLossyConversion: (BOOL)flag;
|
||||||
|
+ (NSStringEncoding) defaultCStringEncoding;
|
||||||
|
- (NSString*) description;
|
||||||
- (NSStringEncoding) fastestEncoding;
|
- (NSStringEncoding) fastestEncoding;
|
||||||
- (NSStringEncoding) smallestEncoding;
|
- (NSStringEncoding) smallestEncoding;
|
||||||
|
|
||||||
// Converting String Contents into a Property List
|
|
||||||
|
|
||||||
- (id)propertyList;
|
|
||||||
- (NSDictionary*) propertyListFromStringsFileFormat;
|
|
||||||
|
|
||||||
// Manipulating File System Paths
|
// Manipulating File System Paths
|
||||||
|
|
||||||
- (unsigned int) completePathIntoString: (NSString**)outputName
|
- (unsigned int) completePathIntoString: (NSString**)outputName
|
||||||
caseSensitive: (BOOL)flag
|
caseSensitive: (BOOL)flag
|
||||||
matchesIntoArray: (NSArray**)outputArray
|
matchesIntoArray: (NSArray**)outputArray
|
||||||
|
@ -223,6 +192,21 @@ typedef enum _NSStringEncoding
|
||||||
- (NSString*) stringByResolvingSymlinksInPath;
|
- (NSString*) stringByResolvingSymlinksInPath;
|
||||||
- (NSString*) stringByStandardizingPath;
|
- (NSString*) stringByStandardizingPath;
|
||||||
|
|
||||||
|
#ifndef STRICT_OPENSTEP
|
||||||
|
+ (NSString*) localizedStringWithFormat: (NSString*) format, ...;
|
||||||
|
+ (NSString*) stringWithFormat: (NSString*)format
|
||||||
|
arguments: (va_list)argList;
|
||||||
|
- (id) initWithFormat: (NSString*)format
|
||||||
|
locale: (NSDictionary*)dictionary;
|
||||||
|
- (id) initWithFormat: (NSString*)format
|
||||||
|
locale: (NSDictionary*)dictionary
|
||||||
|
arguments: (va_list)argList;
|
||||||
|
- (NSComparisonResult) caseInsensitiveCompare: (NSString*)aString;
|
||||||
|
- (BOOL) writeToFile: (NSString*)filename
|
||||||
|
atomically: (BOOL)useAuxiliaryFile;
|
||||||
|
- (double) doubleValue;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NO_GNUSTEP
|
#ifndef NO_GNUSTEP
|
||||||
- (const char *) cStringNoCopy;
|
- (const char *) cStringNoCopy;
|
||||||
#endif /* NO_GNUSTEP */
|
#endif /* NO_GNUSTEP */
|
||||||
|
@ -232,39 +216,30 @@ typedef enum _NSStringEncoding
|
||||||
@interface NSString : NSObject <NSString>
|
@interface NSString : NSObject <NSString>
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/* This private method will go away later. */
|
|
||||||
@interface NSString (NSCStringAccess)
|
|
||||||
- (const char *) _cStringContents;
|
|
||||||
@end
|
|
||||||
|
|
||||||
@class NSMutableString;
|
@class NSMutableString;
|
||||||
|
|
||||||
@protocol NSMutableString <NSString>
|
@protocol NSMutableString <NSString>
|
||||||
|
|
||||||
// Creating Temporary Strings
|
// Creating Temporary Strings
|
||||||
|
|
||||||
+ (NSMutableString*) stringWithCapacity:(unsigned)capacity;
|
+ (NSMutableString*) stringWithCapacity:(unsigned)capacity;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
These methods were already declared above with different return type.
|
These methods were already declared above with different return type.
|
||||||
Including them again here with different return type causes a
|
Including them again here with different return type causes a
|
||||||
compiler warning.
|
compiler warning.
|
||||||
+ (NSMutableString*) stringWithCString: (const char*)byteString;
|
|
||||||
+ (NSMutableString*) stringWithCharacters: (const unichar*)characters
|
+ (NSMutableString*) stringWithCharacters: (const unichar*)characters
|
||||||
length: (unsigned)length;
|
length: (unsigned)length;
|
||||||
|
+ (NSMutableString*) stringWithCString: (const char*)byteString;
|
||||||
+ (NSMutableString*) stringWithCString: (const char*)bytes
|
+ (NSMutableString*) stringWithCString: (const char*)bytes
|
||||||
length:(unsigned)length;
|
length:(unsigned)length;
|
||||||
+ (NSMutableString*) stringWithFormat: (NSString*)format, ...;
|
+ (NSMutableString*) stringWithFormat: (NSString*)format, ...;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Initializing Newly Allocated Strings
|
// Initializing Newly Allocated Strings
|
||||||
|
|
||||||
- initWithCapacity:(unsigned)capacity;
|
- initWithCapacity:(unsigned)capacity;
|
||||||
|
|
||||||
// Modify A String
|
// Modify A String
|
||||||
|
|
||||||
- (void) appendString: (NSString*)aString;
|
|
||||||
- (void) appendFormat: (NSString*)format, ...;
|
- (void) appendFormat: (NSString*)format, ...;
|
||||||
|
- (void) appendString: (NSString*)aString;
|
||||||
- (void) deleteCharactersInRange: (NSRange)range;
|
- (void) deleteCharactersInRange: (NSRange)range;
|
||||||
- (void) insertString: (NSString*)aString atIndex:(unsigned)index;
|
- (void) insertString: (NSString*)aString atIndex:(unsigned)index;
|
||||||
- (void) replaceCharactersInRange: (NSRange)range
|
- (void) replaceCharactersInRange: (NSRange)range
|
||||||
|
|
Loading…
Reference in a new issue