1995-05-05 21:03:04 +00:00
|
|
|
/* Interface for NSCharacterSet for GNUStep
|
1995-07-01 19:01:11 +00:00
|
|
|
Copyright (C) 1995 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
Written by: Adam Fedor <fedor@boulder.colorado.edu>
|
|
|
|
Date: 1995
|
1995-05-05 21:03:04 +00:00
|
|
|
|
1996-05-12 00:56:10 +00:00
|
|
|
This file is part of the GNUstep Base Library.
|
1995-05-05 21:03:04 +00:00
|
|
|
|
|
|
|
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
|
1999-09-09 02:56:20 +00:00
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
|
1999-09-16 07:21:34 +00:00
|
|
|
*/
|
1995-05-05 21:03:04 +00:00
|
|
|
|
1996-04-17 19:36:35 +00:00
|
|
|
#ifndef __NSCharacterSet_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
#define __NSCharacterSet_h_GNUSTEP_BASE_INCLUDE
|
1995-05-05 21:03:04 +00:00
|
|
|
|
|
|
|
#include <Foundation/NSString.h>
|
|
|
|
|
|
|
|
@class NSData;
|
|
|
|
|
1998-07-15 12:42:26 +00:00
|
|
|
@interface NSCharacterSet : NSObject <NSCoding, NSCopying, NSMutableCopying>
|
1995-05-05 21:03:04 +00:00
|
|
|
|
|
|
|
// Creating standard character sets
|
1999-09-16 07:21:34 +00:00
|
|
|
+ (NSCharacterSet*) alphanumericCharacterSet;
|
|
|
|
+ (NSCharacterSet*) controlCharacterSet;
|
|
|
|
+ (NSCharacterSet*) decimalDigitCharacterSet;
|
|
|
|
+ (NSCharacterSet*) decomposableCharacterSet;
|
|
|
|
+ (NSCharacterSet*) illegalCharacterSet;
|
|
|
|
+ (NSCharacterSet*) letterCharacterSet;
|
|
|
|
+ (NSCharacterSet*) lowercaseLetterCharacterSet;
|
|
|
|
+ (NSCharacterSet*) nonBaseCharacterSet;
|
|
|
|
+ (NSCharacterSet*) punctuationCharacterSet;
|
|
|
|
+ (NSCharacterSet*) symbolAndOperatorCharacterSet;
|
|
|
|
+ (NSCharacterSet*) uppercaseLetterCharacterSet;
|
|
|
|
+ (NSCharacterSet*) whitespaceAndNewlineCharacterSet;
|
|
|
|
+ (NSCharacterSet*) whitespaceCharacterSet;
|
1995-05-05 21:03:04 +00:00
|
|
|
|
|
|
|
// Creating custom character sets
|
1999-09-16 07:21:34 +00:00
|
|
|
+ (NSCharacterSet*) characterSetWithBitmapRepresentation: (NSData*)data;
|
|
|
|
+ (NSCharacterSet*) characterSetWithCharactersInString: (NSString*)aString;
|
|
|
|
+ (NSCharacterSet*) characterSetWithRange: (NSRange)aRange;
|
1995-05-05 21:03:04 +00:00
|
|
|
|
1999-09-16 07:21:34 +00:00
|
|
|
- (NSData*) bitmapRepresentation;
|
|
|
|
- (BOOL) characterIsMember: (unichar)aCharacter;
|
|
|
|
- (NSCharacterSet*) invertedSet;
|
1995-05-05 21:03:04 +00:00
|
|
|
|
1998-11-10 20:16:33 +00:00
|
|
|
#ifndef STRICT_MACOS_X
|
2001-12-17 14:31:42 +00:00
|
|
|
+ (NSCharacterSet*) characterSetWithContentsOfFile: (NSString*)aFile;
|
1998-11-10 20:16:33 +00:00
|
|
|
#endif
|
1995-05-05 21:03:04 +00:00
|
|
|
@end
|
|
|
|
|
1998-07-15 12:42:26 +00:00
|
|
|
@interface NSMutableCharacterSet : NSCharacterSet
|
1995-05-05 21:03:04 +00:00
|
|
|
|
1999-09-16 07:21:34 +00:00
|
|
|
- (void) addCharactersInRange: (NSRange)aRange;
|
|
|
|
- (void) addCharactersInString: (NSString*)aString;
|
|
|
|
- (void) formUnionWithCharacterSet: (NSCharacterSet*)otherSet;
|
|
|
|
- (void) formIntersectionWithCharacterSet: (NSCharacterSet*)otherSet;
|
|
|
|
- (void) removeCharactersInRange: (NSRange)aRange;
|
|
|
|
- (void) removeCharactersInString: (NSString*)aString;
|
|
|
|
- (void) invert;
|
1995-05-05 21:03:04 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
1999-09-16 07:21:34 +00:00
|
|
|
#endif /* __NSCharacterSet_h_GNUSTEP_BASE_INCLUDE*/
|