ObjFW  Check-in [5a75edd60e]

Overview
Comment:Add -[OFMutableString prependString:].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5a75edd60eba26ef1269a2a93dc4b6d33ccc9e05caf9a3cdaea88c9b29e04b24
User & Date: js on 2010-11-13 21:26:48
Other Links: manifest | tags
Context
2010-11-13
21:57
Add -[description] for OFObject, OFString, OFArray and OFDictionary. check-in: 9b50b86632 user: js tags: trunk
21:26
Add -[OFMutableString prependString:]. check-in: 5a75edd60e user: js tags: trunk
20:48
Add +[OFDataArray dataArrayWithContentsOfFile:]. check-in: 1c4c60ac36 user: js tags: trunk
Changes

Modified src/OFMutableString.h from [e64875b198] to [b03d870da0].

86
87
88
89
90
91
92







93
94
95
96
97
98
99
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106







+
+
+
+
+
+
+







 *
 * \param fmt A format string which generates the string to append
 * \param args The arguments used in the format string
 */
- (void)appendFormat: (OFString*)fmt
       withArguments: (va_list)args;

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

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

/**
 * Upper the OFString.

Modified src/OFMutableString.m from [21aaad94ff] to [b3b5f8f9a0].

248
249
250
251
252
253
254






255
256
257
258
259
260
261
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267







+
+
+
+
+
+








	@try {
		[self appendCString: t];
	} @finally {
		free(t);
	}
}

- (void)prependString: (OFString*)str
{
	return [self insertString: str
			  atIndex: 0];
}

- (void)reverse
{
	size_t i, j, len = length / 2;

	madvise(string, len, MADV_SEQUENTIAL);