-
Notifications
You must be signed in to change notification settings - Fork 41
/
NSCharacterSet+SSYMoreCS.h
61 lines (47 loc) · 1.76 KB
/
NSCharacterSet+SSYMoreCS.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#import <Cocoa/Cocoa.h>
@interface NSCharacterSet (SSYMoreCS)
/*!
@brief Returns a character set of the 95 ASCII
characters that print.
*/
+ (NSCharacterSet*)printingAsciiCharacterSet ;
/*!
@brief Returns a character set of the 95 characters
that are legal in unix filenames.
@details This is +printingAsciiCharacterSet, plus
the space character, minus the forward slash.
*/
+ (NSCharacterSet*)filenameLegalUnixCharacterSet ;
/*!
@brief Returns +filenameLegalUnixCharacterSet,
minus the colon character, a total of 94 characters.
*/
+ (NSCharacterSet*)filenameLegalMacUnixCharacterSet ;
/*!
@brief Prints a string containing one each of all the characters
in the receiver.
@details Warning: There are 65535 possible characters in Unicode,
I believe. This method is mainly for debugging.
*/
- (NSString*)stringOfAllCharacters ;
/*!
@brief Returns the character set of all Unicode characters which are
not allowed to be in the 'host' portion of a URL.
@details See http://en.wikipedia.org/wiki/Hostname ▸ Restrictions on valid host names
*/
+ (NSCharacterSet*)characterSetNotAllowedInUrlHost ;
/*!
@brief Character set consisting of all the printing and non-printing characters you can
type on a USA keyboard, using on the shift key as modifier.
*/
+ (NSCharacterSet*)ssyUsaKeyboardCharacterSet ;
+ (NSCharacterSet*)ssyHexDigitsCharacterSet ;
/*!
@brief Returns the set of control characters, except for whitespace and
newline characters.
@details A user had 0x03 in a bookmark name. When encoded to JSON and then
sent to my Firefox extension, Firefox barfed on it. Also, see
http://stackoverflow.com/questions/24803275/how-do-i-remove-hidden-characters-from-a-nsstring
*/
+ (NSCharacterSet*)zeroWidthAndIllegalCharacterSet;
@end