Up
Authors
- Richard Frith-Macdonald (
rfm@gnu.org
)
-
Copyright: (C) 2003 Free Software Foundation, Inc.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
- (id)
initWithArray: (NSArray*)array
copyItems: (BOOL)shouldCopy;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
+ (NSString*)
pathForLibraryResource: (NSString*)name
ofType: (NSString*)ext
inDirectory: (NSString*)bundlePath;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Extension methods for the NSCalendarDate class
Method summary
- (int)
weekOfYear;
Availability: OpenStep
The ISO standard week of the year is based on the first week of the year being that week (starting on monday) for which the thursday is on or after the first of january.
This has the effect that, if january first is a friday, saturday or sunday, the days of that week (up to and including the sunday) are considered to be in week 53 of the preceding year. Similarly if the last day of the year is a monday tuesday or wednesday, these days are part of week 1 of the next year.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Extension methods for the NSData class.
Method summary
- (NSString*)
hexadecimalRepresentation;
Availability: OpenStep
Returns an NSString object containing an ASCII hexadecimal representation of the receiver. This means that the returned object will contain exactly twice as many characters as there are bytes as the receiver, as each byte in the receiver is represented by two hexadecimal digits.
The high order four bits of each byte is encoded before the low order four bits. Capital letters 'A' to 'F' are used to represent values from 10 to 15.
If you need the hexadecimal representation as raw byte data, use code like -
hexData = [[sourceData hexadecimalRepresentation] dataUsingEncoding: NSASCIIStringEncoding];
- (id)
initWithHexadecimalRepresentation: (NSString*)string;
Availability: OpenStep
Initialises the receiver with the supplied
string data which contains a hexadecimal coding of the bytes. The parsing of the
string is fairly tolerant, ignoring whitespace and permitting both upper and lower case hexadecimal digits (the
-hexadecimalRepresentation
method produces a
string using only uppercase digits with no white space).
If the
string does not contain one or more pairs of hexadecimal digits then an exception is raised.
- (NSData*)
md5Digest;
Availability: OpenStep
Creates an MD5 digest of the information stored in the receiver and returns it as an autoreleased 16 byte NSData object.
If you need to produce a digest of string information, you need to decide what character encoding is to be used and convert your string to a data object of that encoding type first using the [NSString -dataUsingEncoding:]
method -
myDigest = [[myString dataUsingEncoding: NSUTF8StringEncoding] md5Digest];
If you need to use the digest in a human readable form, you will probably want it to be seen as 32 hexadecimal digits, and can do that using the
-hexadecimalRepresentation
method.
- (BOOL)
uudecodeInto: (NSMutableData*)decoded
name: (NSString**)namePtr
mode: (int*)modePtr;
Availability: OpenStep
Decodes the source data from uuencoded and return the result.
Returns the encoded file name in namePtr if it is not null. Returns the encoded file mode in modePtr if it is not null.
- (BOOL)
uuencodeInto: (NSMutableData*)encoded
name: (NSString*)name
mode: (int)mode;
Availability: OpenStep
Encode the source data to uuencoded.
Uses the supplied name as the filename in the encoded data, and says that the file mode is as specified.
If no name is supplied, uses untitled
as the name.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
+ (void)
setDebug: (int)val;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
+ (id)
fileHandleAsServerAtAddress: (NSString*)address
service: (NSString*)service
protocol: (NSString*)protocol;
Availability: OpenStep
Description forthcoming.
- (NSString*)
socketAddress;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
- (id)
initWithArgframe: (arglist_t)args
selector: (SEL)selector;
Availability: OpenStep
Description forthcoming.
- (retval_t)
returnFrame: (arglist_t)args;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
+ (id)
newLockAt: (id*)location;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
- (void)
gcFinalize;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
GNUstep specific (non-standard) additions to the NSMutableString class.
Method summary
- (void)
deletePrefix: (NSString*)prefix;
Availability: OpenStep
Removes the specified prefix from the string. Raises an exception if the prefix is not present.
- (void)
deleteSuffix: (NSString*)suffix;
Availability: OpenStep
Removes the specified suffix from the string. Raises an exception if the suffix is not present.
- (void)
replaceString: (NSString*)replace
withString: (NSString*)by;
Availability: OpenStep
Replaces all occurrences of the string replace with the string by in the receiver.
Has no effect if replace does not occur within the receiver. NB. an empty string is not considered to exist within the receiver.
Calls - replaceOccurrencesOfString:withString:options:range: passing zero for the options and a range from 0 with the length of the receiver. Note that is has to work for [tmp replaceString: @"&" withString: @"&"];
- (void)
trimLeadSpaces;
Availability: OpenStep
Removes all leading white space from the receiver.
- (void)
trimSpaces;
Availability: OpenStep
Removes all leading or trailing white space from the receiver.
- (void)
trimTailSpaces;
Availability: OpenStep
Removes all trailing white space from the receiver.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
GNUstep specific (non-standard) additions to the NSNumber class.
Method summary
+ (NSValue*)
valueFromString: (NSString*)string;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Extension methods for the NSObject class
Method summary
- (NSComparisonResult)
compare: (id)anObject;
Availability: OpenStep
WARNING: The
-compare:
method for NSObject is deprecated due to subclasses declaring the same selector with conflicting signatures. Comparison of arbitrary objects is not just meaningless but also dangerous as most concrete implementations expect comparable objects as arguments often accessing instance variables directly. This method will be removed in a future release.
- (id)
notImplemented: (SEL)aSel;
Availability: OpenStep
Description forthcoming.
- (id)
shouldNotImplement: (SEL)aSel;
Availability: OpenStep
Description forthcoming.
- (id)
subclassResponsibility: (SEL)aSel;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
+ (id)
notImplemented: (SEL)selector;
Availability: OpenStep
Description forthcoming.
- (BOOL)
isInstance;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
- (NSMutableSet*)
debugSet;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
+ (id)
newLockAt: (id*)location;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
- (void)
gcFinalize;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
GNUstep specific (non-standard) additions to the NSString class.
Method summary
+ (id)
stringWithFormat: (NSString*)format
arguments: (va_list)argList;
Availability: OpenStep
Returns an autoreleased string initialized with -initWithFormat:arguments:
.
- (NSString*)
stringByDeletingPrefix: (NSString*)prefix;
Availability: OpenStep
Returns a string formed by removing the prefix string from the receiver. Raises an exception if the prefix is not present.
- (NSString*)
stringByDeletingSuffix: (NSString*)suffix;
Availability: OpenStep
Returns a string formed by removing the suffix string from the receiver. Raises an exception if the suffix is not present.
- (NSString*)
stringByReplacingString: (NSString*)replace
withString: (NSString*)by;
Availability: OpenStep
Returns a string in which any (and all) occurrences of replace in the receiver have been replaced with by. Returns the receiver if replace does not occur within the receiver. NB. an empty string is not considered to exist within the receiver.
- (NSString*)
stringByTrimmingLeadSpaces;
Availability: OpenStep
Returns a string formed by removing leading white space from the receiver.
- (NSString*)
stringByTrimmingSpaces;
Availability: OpenStep
Returns a string formed by removing both leading and trailing white space from the receiver.
- (NSString*)
stringByTrimmingTailSpaces;
Availability: OpenStep
Returns a string formed by removing trailing white space from the receiver.
- Declared in:
- GNUstepBase/GSCategories.h
Availability: OpenStep
Description forthcoming.
Method summary
- (BOOL)
boolValue;
Availability: OpenStep
Description forthcoming.
- (NSString*)
substringFromRange: (NSRange)range;
Availability: OpenStep
Description forthcoming.
Up