2003-01-09 16:03:50 +00:00
|
|
|
#ifndef INCLUDED_GS_CATEGORIES_H
|
|
|
|
#define INCLUDED_GS_CATEGORIES_H
|
2003-04-06 17:20:04 +00:00
|
|
|
/** Declaration of extension methods and functions for standard classes
|
2003-01-09 16:03:50 +00:00
|
|
|
|
|
|
|
Copyright (C) 2003 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Written by: Richard Frith-Macdonald <rfm@gnu.org>
|
|
|
|
|
|
|
|
This file is part of the GNUstep Base Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
|
|
|
|
|
|
|
AutogsdocSource: Additions/GSCategories.m
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2003-04-17 06:20:17 +00:00
|
|
|
|
|
|
|
/* The following ifndef prevents the categories declared in this file being
|
|
|
|
* seen in GNUstep code. This is necessary because those category
|
|
|
|
* declarations are also present in the header files for the corresponding
|
|
|
|
* classes in GNUstep. The separate category declarations in this file
|
|
|
|
* are only needed for software using the GNUstep Additions library
|
|
|
|
* without the main GNUstep base library.
|
|
|
|
*/
|
|
|
|
#ifndef GNUSTEP
|
|
|
|
|
2003-01-31 18:25:41 +00:00
|
|
|
#include <Foundation/Foundation.h>
|
|
|
|
|
2003-01-09 16:03:50 +00:00
|
|
|
@interface NSCalendarDate (GSCategories)
|
|
|
|
- (int) weekOfYear;
|
|
|
|
@end
|
|
|
|
|
2003-01-23 10:51:51 +00:00
|
|
|
@interface NSData (GSCategories)
|
2003-01-24 12:06:33 +00:00
|
|
|
- (NSString*) hexadecimalRepresentation;
|
2003-01-27 09:18:58 +00:00
|
|
|
- (id) initWithHexadecimalRepresentation: (NSString*)string;
|
2003-01-24 12:06:33 +00:00
|
|
|
- (NSData*) md5Digest;
|
2003-01-23 10:51:51 +00:00
|
|
|
@end
|
|
|
|
|
2003-01-31 18:25:41 +00:00
|
|
|
@interface NSString (GSCategories)
|
|
|
|
- (NSString*) stringByDeletingPrefix: (NSString*)prefix;
|
|
|
|
- (NSString*) stringByDeletingSuffix: (NSString*)suffix;
|
2003-03-31 02:59:56 +00:00
|
|
|
- (NSString*) stringByTrimmingLeadSpaces;
|
|
|
|
- (NSString*) stringByTrimmingTailSpaces;
|
|
|
|
- (NSString*) stringByTrimmingSpaces;
|
|
|
|
- (NSString*) stringByReplacingString: (NSString*)replace
|
|
|
|
withString: (NSString*)by;
|
2003-01-31 18:25:41 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSMutableString (GSCategories)
|
|
|
|
- (void) deleteSuffix: (NSString*)suffix;
|
|
|
|
- (void) deletePrefix: (NSString*)prefix;
|
2003-03-31 02:59:56 +00:00
|
|
|
- (void) replaceString: (NSString*)replace
|
|
|
|
withString: (NSString*)by;
|
|
|
|
- (void) trimLeadSpaces;
|
|
|
|
- (void) trimTailSpaces;
|
|
|
|
- (void) trimSpaces;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSNumber(GSCategories)
|
|
|
|
+ (NSValue*) valueFromString: (NSString *)string;
|
2003-01-31 18:25:41 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSObject (GSCategories)
|
|
|
|
- notImplemented:(SEL)aSel;
|
|
|
|
- (id) subclassResponsibility: (SEL)aSel;
|
|
|
|
- (id) shouldNotImplement: (SEL)aSel;
|
|
|
|
- (NSComparisonResult) compare: (id)anObject;
|
|
|
|
@end
|
|
|
|
|
2003-04-06 17:20:04 +00:00
|
|
|
|
2003-04-17 06:20:17 +00:00
|
|
|
#endif /* GNUSTEP */
|
|
|
|
|
2003-01-09 16:03:50 +00:00
|
|
|
#endif /* INCLUDED_GS_CATEGORIES_H */
|