forked from nolanw/HTMLReader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHTMLEntities.h
More file actions
27 lines (23 loc) · 1.16 KB
/
HTMLEntities.h
File metadata and controls
27 lines (23 loc) · 1.16 KB
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
// HTMLEntities.h
//
// Public domain. https://github.com/nolanw/HTMLReader
#import <Foundation/Foundation.h>
/**
* Returns the code point for a numeric HTML entity if it is meant to be replaced, or U+0000 NULL if no replacement is required.
*
* For more information, see http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#table-charref-overrides
*/
extern UTF32Char ReplacementForNumericEntity(UInt32 entity);
/**
* Returns the replacement string for a named entity, or nil if there is no match.
*
* @param entityName A string whose prefix is tested for a named entity. The ampersand that starts the entity should not be included.
* @param parsedName If non-nil and a match is found, will contain the matching entity name. This will be a (possibly proper) prefix of entityName.
*
* For more information, see http://www.whatwg.org/specs/web-apps/current-work/multipage/named-character-references.html
*/
extern NSString * StringForNamedEntity(NSString *entityName, NSString * __autoreleasing *parsedName);
/**
* No named entities are longer than this (does not consider the leading ampersand).
*/
extern const NSUInteger LongestEntityNameLength;