ObjFW
Loading...
Searching...
No Matches
OFString+XMLUnescaping.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This file is part of ObjFW. It may be distributed under the terms of the
7 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8 * the packaging of this file.
9 *
10 * Alternatively, it may be distributed under the terms of the GNU General
11 * Public License, either version 2 or 3, which can be found in the file
12 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13 * file.
14 */
15
16#import "OFString.h"
17
18OF_ASSUME_NONNULL_BEGIN
19
22#ifdef __cplusplus
23extern "C" {
24#endif
25extern int _OFString_XMLUnescaping_reference;
26#ifdef __cplusplus
27}
28#endif
29
30#ifdef OF_HAVE_BLOCKS
39typedef OFString *_Nullable (^OFStringXMLUnescapingBlock)(OFString *string,
40 OFString *entity);
41#endif
42
49@protocol OFStringXMLUnescapingDelegate <OFObject>
62- (nullable OFString *)string: (OFString *)string
63 containsUnknownEntityNamed: (OFString *)entity;
64@end
65
66@interface OFString (XMLUnescaping)
70@property (readonly, nonatomic) OFString *stringByXMLUnescaping;
71
80- (OFString *)stringByXMLUnescapingWithDelegate:
81 (nullable id <OFStringXMLUnescapingDelegate>)delegate;
82
83#ifdef OF_HAVE_BLOCKS
92- (OFString *)stringByXMLUnescapingWithBlock: (OFStringXMLUnescapingBlock)block;
93#endif
94@end
95
96OF_ASSUME_NONNULL_END
OFString *(^ OFStringXMLUnescapingBlock)(OFString *string, OFString *entity)
A block which is called to replace unknown XML entities in an XML string.
Definition OFString+XMLUnescaping.h:39
The root class for all other classes inside ObjFW.
Definition OFObject.h:688
A class for handling strings.
Definition OFString.h:135