Up
Authors
- Adam Fedor (
fedor@boulder.colorado.edu
)
-
- Richard Frith-Macdonald (
rfm@gnu.org
)
-
Version: 37003
Date: 2013-08-22 09:44:54 -0600 (Thu, 22 Aug 2013)
Copyright: (C)
1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- Declared in:
- Foundation/NSCharacterSet.h
- Conforms to:
- NSCoding
- NSCopying
- NSMutableCopying
Availability: OpenStep
Represents a set of unicode characters. Used by
NSScanner
and
NSString
for parsing-related methods.
Method summary
+ (id)
alphanumericCharacterSet;
Availability: OpenStep
Returns a character set containing letters,
numbers, and diacritical marks. Note that
"letters" includes all alphabetic as well as
Chinese characters, etc..
+ (id)
capitalizedLetterCharacterSet;
Availability: MacOS-X 10.0.0
Returns a character set containing letters in the
unicode Titlecase category.
+ (id)
characterSetWithBitmapRepresentation: (
NSData*)data;
Availability: OpenStep
Returns a character set containing characters as
encoded in the data object (8192 bytes)
+ (id)
characterSetWithCharactersInString: (
NSString*)aString;
Availability: OpenStep
Returns set with characters in aString,
or empty set for empty string. Raises an exception if
given a nil
string.
+ (id)
characterSetWithContentsOfFile: (
NSString*)aFile;
Availability: OPENSTEP 4.0.0 removed at MacOS-X 10.0.0
Initializes from a bitmap (8192 bytes
representing 65536 values).
Each bit
set in the bitmap represents the fact that a character
at that position in the unicode base plane exists in the
characterset.
File must have extension
" .bitmap
". To get around this load the
file into data yourself and use [NSCharacterSet
-characterSetWithBitmapRepresentation].
+ (id)
characterSetWithRange: (
NSRange)aRange;
Availability: OpenStep
Returns set containing unicode index range given by
aRange.
+ (id)
controlCharacterSet;
Availability: OpenStep
Returns a character set containing control and
format characters.
+ (id)
decimalDigitCharacterSet;
Availability: OpenStep
Returns a character set containing characters that
represent the decimal digits 0 through 9.
+ (id)
decomposableCharacterSet;
Availability: OpenStep
Returns a character set containing individual
characters that can be represented also by a
composed character sequence.
+ (id)
illegalCharacterSet;
Availability: OpenStep
Returns a character set containing unassigned and
explicitly illegal character values.
+ (id)
letterCharacterSet;
Availability: OpenStep
Returns a character set containing letters,
including all alphabetic as well as Chinese
characters, etc..
+ (id)
lowercaseLetterCharacterSet;
Availability: OpenStep
Returns a character set that contains the lowercase
characters. This set does not include caseless
characters, only those that have corresponding
characters in uppercase and/or titlecase.
+ (id)
newlineCharacterSet;
Availability: MacOS-X 10.0.0
Returns a character set containing the newline
characters, values 0x000A and 0x000D and
nextline 0x0085 character.
+ (id)
nonBaseCharacterSet;
Availability: OpenStep
Returns a character set containing characters for
diacritical marks, which are usually only
rendered in conjunction with another character.
+ (id)
punctuationCharacterSet;
Availability: OpenStep
Returns a character set containing punctuation
marks.
+ (id)
symbolCharacterSet;
Availability: MacOS-X 10.0.0
Returns a character set containing mathematical
symbols, etc..
+ (id)
uppercaseLetterCharacterSet;
Availability: OpenStep
Returns a character set that contains the uppercase
characters. This set does not include caseless
characters, only those that have corresponding
characters in lowercase and/or titlecase.
+ (id)
whitespaceAndNewlineCharacterSet;
Availability: OpenStep
Returns a character set that contains the
whitespace characters, plus the newline
characters, values 0x000A and 0x000D and
nextline 0x0085 character.
+ (id)
whitespaceCharacterSet;
Availability: OpenStep
Returns a character set that contains the
whitespace characters.
- (
NSData*)
bitmapRepresentation;
Availability: OpenStep
Returns a bitmap representation of the receiver's
character set (suitable for archiving or writing
to a file), in an NSData object.
- (BOOL)
characterIsMember: (
unichar)aCharacter;
Availability: OpenStep
Returns YES
if the receiver contains
aCharacter, NO
if it
does not.
- (BOOL)
hasMemberInPlane: (uint8_t)aPlane;
Availability: MacOS-X 10.0.0
Returns YES
if the receiver contains
at least one character in the specified unicode plane.
- (
NSCharacterSet*)
invertedSet;
Availability: OpenStep
Returns a character set containing only characters
that the receiver does not contain.
- (BOOL)
isSupersetOfSet: (
NSCharacterSet*)aSet;
Availability: MacOS-X 10.0.0
Returns YES
is all the characters in
aSet are present in the receiver.
- (BOOL)
longCharacterIsMember: (UTF32Char)aCharacter;
Availability: MacOS-X 10.0.0
Returns YES
is the specified 32-bit
character is present in the receiver.
- Declared in:
- Foundation/NSCharacterSet.h
Availability: OpenStep
Method summary
- (void)
addCharactersInRange: (
NSRange)aRange;
Availability: OpenStep
Adds characters specified by unicode indices in
aRange to set.
- (void)
addCharactersInString: (
NSString*)aString;
Availability: OpenStep
Adds characters in aString to set.
- (void)
formIntersectionWithCharacterSet: (
NSCharacterSet*)otherSet;
Availability: OpenStep
Set intersection of character sets.
- (void)
formUnionWithCharacterSet: (
NSCharacterSet*)otherSet;
Availability: OpenStep
Set union of character sets.
- (void)
invert;
Availability: OpenStep
Remove all characters currently in set and add all
other characters.
- (void)
removeCharactersInRange: (
NSRange)aRange;
Availability: OpenStep
Drop given range of characters. No error for
characters not currently in set.
- (void)
removeCharactersInString: (
NSString*)aString;
Availability: OpenStep
Drop characters in aString. No error for
characters not currently in set.
Up