ObjFW  Diff

Differences From Artifact [960bff6aa8]:

To Artifact [02e4c6ad2f]:


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
62
63
64
65
66
67
68
69
70
71
72
73
















74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#import "OFString.h"

/**
 * \brief A class for storing and modifying strings.
 */
@interface OFMutableString: OFString
/**
 * Sets the OFString to the specified UTF-8 encoded C string.
 *
 * \param string A UTF-8 encoded C string to set the OFString to.
 */
- (void)setToCString: (const char*)string;

/**
 * Appends a UTF-8 encoded C string to the OFString.
 *
 * \param string A UTF-8 encoded C string to append
 */
- (void)appendCString: (const char*)string;

/**
 * Appends a UTF-8 encoded C string with the specified length to the OFString.

 *
 * \param string A UTF-8 encoded C string to append
 * \param length The length of the UTF-8 encoded C string
 */
- (void)appendCString: (const char*)string
	   withLength: (size_t)length;

/**












 * Appends a UTF-8 encoded C string to the OFString without checking whether it
 * is valid UTF-8.
 *
 * Only use this if you are 100% sure the string you append is either ASCII or
 * UTF-8!
 *
 * \param string A UTF-8 encoded C string to append
 */
- (void)appendCStringWithoutUTF8Checking: (const char*)string;

/**
 * Appends a UTF-8 encoded C string with the specified length to the OFString
 * without checking whether it is valid UTF-8.
 *
 * Only use this if you are 100% sure the string you append is either ASCII or
 * UTF-8!
 *
 * \param string A UTF-8 encoded C string to append
 * \param length The length of the UTF-8 encoded C string
 */
- (void)appendCStringWithoutUTF8Checking: (const char*)string
				  length: (size_t)length;

/**
















 * Appends another OFString to the OFString.
 *
 * \param string An OFString to append
 */
- (void)appendString: (OFString*)string;

/**
 * Appends a formatted UTF-8 encoded C string to the OFString.
 * See printf for the format syntax.
 *
 * \param format A format string which generates the string to append
 */
- (void)appendFormat: (OFString*)format, ...;

/**
 * Appends a formatted UTF-8 encoded C string to the OFString.
 * See printf for the format syntax.
 *
 * \param format A format string which generates the string to append
 * \param arguments The arguments used in the format string
 */
- (void)appendFormat: (OFString*)format
       withArguments: (va_list)arguments;

/**
 * Prepends another OFString to the OFString.
 *
 * \param string An OFString to prepend
 */
- (void)prependString: (OFString*)string;

/**
 * Reverse the OFString.
 */
- (void)reverse;

/**
 * Upper the OFString.
 */
- (void)upper;

/**
 * Lower the OFString.
 */
- (void)lower;

/**
 * Inserts a string at the specified index.
 *
 * \param string The string to insert







|

|




|






|
>








>
>
>
>
>
>
>
>
>
>
>
>
|
|









|
|











>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|






|







|









|






|




|




|







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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#import "OFString.h"

/**
 * \brief A class for storing and modifying strings.
 */
@interface OFMutableString: OFString
/**
 * Sets the OFMutableString to the specified UTF-8 encoded C string.
 *
 * \param string A UTF-8 encoded C string to set the OFMutableString to.
 */
- (void)setToCString: (const char*)string;

/**
 * Appends a UTF-8 encoded C string to the OFMutableString.
 *
 * \param string A UTF-8 encoded C string to append
 */
- (void)appendCString: (const char*)string;

/**
 * Appends a UTF-8 encoded C string with the specified length to the
 * OFMutableString.
 *
 * \param string A UTF-8 encoded C string to append
 * \param length The length of the UTF-8 encoded C string
 */
- (void)appendCString: (const char*)string
	   withLength: (size_t)length;

/**
 * Appends a C string with the specified encoding and length to the
 * OFMutableString.
 *
 * \param string A C string to append
 * \param encoding The encoding of the C string
 * \param length The length of the UTF-8 encoded C string
 */
- (void)appendCString: (const char*)string
	 withEncoding: (of_string_encoding_t)encoding
	       length: (size_t)length;

/**
 * Appends a UTF-8 encoded C string to the OFMutableString without checking
 * whether it is valid UTF-8.
 *
 * Only use this if you are 100% sure the string you append is either ASCII or
 * UTF-8!
 *
 * \param string A UTF-8 encoded C string to append
 */
- (void)appendCStringWithoutUTF8Checking: (const char*)string;

/**
 * Appends a UTF-8 encoded C string with the specified length to the
 * OFMutableString without checking whether it is valid UTF-8.
 *
 * Only use this if you are 100% sure the string you append is either ASCII or
 * UTF-8!
 *
 * \param string A UTF-8 encoded C string to append
 * \param length The length of the UTF-8 encoded C string
 */
- (void)appendCStringWithoutUTF8Checking: (const char*)string
				  length: (size_t)length;

/**
 * Appends a C string with the specified encoding and length length to the
 * OFString without checking whether it is valid UTF-8 if the specified encoding
 * is UTF-8.
 *
 * Only use this if you are 100% sure the string you append is either ASCII or
 * UTF-8 if you specified UTF-8 as encoding!
 *
 * \param string A C string to append
 * \param encoding The encoding of the C string
 * \param length The length of the UTF-8 encoded C string
 */
- (void)appendCStringWithoutUTF8Checking: (const char*)string
				encoding: (of_string_encoding_t)encoding
				  length: (size_t)length;

/**
 * Appends another OFString to the OFMutableString.
 *
 * \param string An OFString to append
 */
- (void)appendString: (OFString*)string;

/**
 * Appends a formatted UTF-8 encoded C string to the OFMutableString.
 * See printf for the format syntax.
 *
 * \param format A format string which generates the string to append
 */
- (void)appendFormat: (OFString*)format, ...;

/**
 * Appends a formatted UTF-8 encoded C string to the OFMutableString.
 * See printf for the format syntax.
 *
 * \param format A format string which generates the string to append
 * \param arguments The arguments used in the format string
 */
- (void)appendFormat: (OFString*)format
       withArguments: (va_list)arguments;

/**
 * Prepends another OFString to the OFMutableString.
 *
 * \param string An OFString to prepend
 */
- (void)prependString: (OFString*)string;

/**
 * Reverse the OFMutableString.
 */
- (void)reverse;

/**
 * Upper the OFMutableString.
 */
- (void)upper;

/**
 * Lower the OFMutableString.
 */
- (void)lower;

/**
 * Inserts a string at the specified index.
 *
 * \param string The string to insert