Index: src/OFMutableString.h ================================================================== --- src/OFMutableString.h +++ src/OFMutableString.h @@ -88,10 +88,17 @@ * \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; Index: src/OFMutableString.m ================================================================== --- src/OFMutableString.m +++ src/OFMutableString.m @@ -250,10 +250,16 @@ [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;