Skip to content
Newer
Older
100644 52 lines (38 sloc) 2.2 KB
d6a2787 @odrobnik Added new files
odrobnik authored Jan 16, 2011
1 //
2 // NSCharacterSet+HTML.h
3 // CoreTextExtensions
4 //
5 // Created by Oliver Drobnik on 1/15/11.
6 // Copyright 2011 Drobnik.com. All rights reserved.
7 //
8
afd603b @odrobnik Mac Compatibility Mode: for Mac based UnitTest to compare generated o…
odrobnik authored Jan 31, 2012
9 #import <Foundation/Foundation.h>
d6a2787 @odrobnik Added new files
odrobnik authored Jan 16, 2011
10
43f2bf8 @odrobnik Updated docs style
odrobnik authored Mar 3, 2012
11 /**
12 Category on NSCharacterSet to create character sets frequently used and relevant to HTML and CSS string manipulations. Each character set is only initialized once.
13 */
d6a2787 @odrobnik Added new files
odrobnik authored Jan 16, 2011
14 @interface NSCharacterSet (HTML)
15
43f2bf8 @odrobnik Updated docs style
odrobnik authored Mar 3, 2012
16
17 /**
18 Creates an alpha-numeric character set, appropriate for tag names.
19 @returns An NSCharacterSet with alpha-numeric characters. a-Z, 0-9.
20 */
d6a2787 @odrobnik Added new files
odrobnik authored Jan 16, 2011
21 + (NSCharacterSet *)tagNameCharacterSet;
54252d2 @joepasq Documented NSCharacterSet+HTML.h.
joepasq authored Mar 2, 2012
22
43f2bf8 @odrobnik Updated docs style
odrobnik authored Mar 3, 2012
23
24 /**
25 Creates an alpha-numeric character set just as tagNameCharacterSet does but also with colon, dash, and underscore characters, appropriate for tag attribute names.
26 @returns An NSCharacterSet with alpha-numeric characters and colon :, dash -, and underscore _'.
27 */
ccb2dcf @odrobnik Minor changes
odrobnik authored Mar 17, 2011
28 + (NSCharacterSet *)tagAttributeNameCharacterSet;
54252d2 @joepasq Documented NSCharacterSet+HTML.h.
joepasq authored Mar 2, 2012
29
43f2bf8 @odrobnik Updated docs style
odrobnik authored Mar 3, 2012
30
31 /**
32 Creates a character set with the apostrophe character ' (used as single quote agnostic of direction) and double quote character " (agnostic of direction).
33 @returns An NSCharacterSet with the single quote and double quote characters: ', ".
34 */
1c8316b @odrobnik Parsing Performance Tuning: don't convert dictionary to immutable for…
odrobnik authored Mar 31, 2011
35 + (NSCharacterSet *)quoteCharacterSet;
54252d2 @joepasq Documented NSCharacterSet+HTML.h.
joepasq authored Mar 2, 2012
36
43f2bf8 @odrobnik Updated docs style
odrobnik authored Mar 3, 2012
37
38 /**
39 Creates a character set with the characters forward slash / and closing angle bracket aka greater than sign >, then forms the union of this character set with the [whitespace character set](https://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSCharacterSet_Class/Reference/Reference.html) which includes space, tab, newline, and nextline characters. Useful to find the end of an attribute.
40 @returns An NSCharacterSet with the forward slash, closing angle bracket characters, tab, space, newline, and nextline characters.
41 */
1c8316b @odrobnik Parsing Performance Tuning: don't convert dictionary to immutable for…
odrobnik authored Mar 31, 2011
42 + (NSCharacterSet *)nonQuotedAttributeEndCharacterSet;
54252d2 @joepasq Documented NSCharacterSet+HTML.h.
joepasq authored Mar 2, 2012
43
43f2bf8 @odrobnik Updated docs style
odrobnik authored Mar 3, 2012
44
45 /**
46 Creates an alpha-numeric character set just as tagNameCharacterSet does but also with the dash and underscore characters. Does not contain the colon character because it will mess up parsing of CSS style attributes. Useful for CSS attribute names.
47 @returns An NSCharacterSet with alpha-numeric characters, dash, and underscore characters.
48 */
1ee93c5 @odrobnik Fixed issue where the addition of : to tagName characters caused a pr…
odrobnik authored Jul 19, 2011
49 + (NSCharacterSet *)cssStyleAttributeNameCharacterSet;
d6a2787 @odrobnik Added new files
odrobnik authored Jan 16, 2011
50
51 @end
Something went wrong with that request. Please try again.