ObjFW  Diff

Differences From Artifact [ab2207f3d5]:

To Artifact [98b6def095]:


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
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
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
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







-
+






-
+







-
-
+
+










-
+











-
-
+
+






-
+







-
+








-
-
+
+




-
+




-
+




-
+








-
-
+
+






-
+







-
-
+
+




-
+




-
+




-
+

 */
@interface OFMutableString: OFString {}
/**
 * Sets the OFString to the specified UTF-8 encoded C string.
 *
 * \param str A UTF-8 encoded C string to set the OFString to.
 */
- setToCString: (const char*)str;
- (void)setToCString: (const char*)str;

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

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

/**
 * 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 str A UTF-8 encoded C string to append
 */
- appendCStringWithoutUTF8Checking: (const char*)str;
- (void)appendCStringWithoutUTF8Checking: (const char*)str;

/**
 * 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 str A UTF-8 encoded C string to append
 * \param len The length of the UTF-8 encoded C string
 */
- appendCStringWithoutUTF8Checking: (const char*)str
			    length: (size_t)len;
- (void)appendCStringWithoutUTF8Checking: (const char*)str
				  length: (size_t)len;

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

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

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

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

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

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

/**
 * Removes the characters at the specified range.
 *
 * \param start The index where the deletion should be started
 * \param end The index until which the characters should be deleted.
 *	      This points BEHIND the last character!
 */
- removeCharactersFromIndex: (size_t)start
		    toIndex: (size_t)end;
- (void)removeCharactersFromIndex: (size_t)start
			  toIndex: (size_t)end;

/**
 * Removes the characters at the specified range.
 *
 * \param range The range of the characters which should be removed
 */
- removeCharactersInRange: (of_range_t)range;
- (void)removeCharactersInRange: (of_range_t)range;

/**
 * Replaces all occurrences of a string with another string.
 *
 * \param str The string to replace
 * \param repl The string with which it should be replaced
 */
- replaceOccurrencesOfString: (OFString*)str
		  withString: (OFString*)repl;
- (void)replaceOccurrencesOfString: (OFString*)str
			withString: (OFString*)repl;

/**
 * Removes all whitespaces at the beginning of a string.
 */
- removeLeadingWhitespaces;
- (void)removeLeadingWhitespaces;

/**
 * Removes all whitespaces at the end of a string.
 */
- removeTrailingWhitespaces;
- (void)removeTrailingWhitespaces;

/**
 * Removes all whitespaces at the beginning and the end of a string.
 */
- removeLeadingAndTrailingWhitespaces;
- (void)removeLeadingAndTrailingWhitespaces;
@end