ObjFW
|
A class for storing and modifying strings. More...
#import <OFMutableString.h>
Public Member Functions | |
(void) | - setCharacter:atIndex: |
Sets the character at the specified index. | |
(void) | - appendUTF8String: |
Appends a UTF-8 encoded C string to the OFMutableString. | |
(void) | - appendUTF8String:withLength: |
Appends a UTF-8 encoded C string with the specified length to the OFMutableString. | |
(void) | - appendCString:withEncoding: |
Appends a C string with the specified encoding to the OFMutableString. | |
(void) | - appendCString:withEncoding:length: |
Appends a C string with the specified encoding and length to the OFMutableString. | |
(void) | - appendString: |
Appends another OFString to the OFMutableString. | |
(void) | - appendFormat: |
Appends a formatted string to the OFMutableString. | |
(void) | - appendFormat:withArguments: |
Appends a formatted string to the OFMutableString. | |
(void) | - prependString: |
Prepends another OFString to the OFMutableString. | |
(void) | - reverse |
Reverses the OFMutableString. | |
(void) | - upper |
Converts the OFMutableString to uppercase. | |
(void) | - lower |
Converts the OFMutableString to lowercase. | |
(void) | - insertString:atIndex: |
Inserts a string at the specified index. | |
(void) | - deleteCharactersInRange: |
Deletes the characters at the specified range. | |
(void) | - replaceCharactersInRange:withString: |
Replaces the characters at the specified range. | |
(void) | - replaceOccurrencesOfString:withString: |
Replaces all occurrences of a string with another string. | |
(void) | - replaceOccurrencesOfString:withString:inRange: |
Replaces all occurrences of a string in the specified range with another string. | |
(void) | - deleteLeadingWhitespaces |
Deletes all whitespaces at the beginning of the string. | |
(void) | - deleteTrailingWhitespaces |
Deletes all whitespaces at the end of the string. | |
(void) | - deleteEnclosingWhitespaces |
Deletes all whitespaces at the beginning and the end of the string. | |
(void) | - makeImmutable |
Converts the mutable string to an immutable string. |
A class for storing and modifying strings.
- (void) appendCString: | (const char*) | cString | |
withEncoding: | (of_string_encoding_t) | encoding | |
Appends a C string with the specified encoding to the OFMutableString.
cString | A C string to append |
encoding | The encoding of the C string |
- (void) appendCString: | (const char*) | cString | |
withEncoding: | (of_string_encoding_t) | encoding | |
length: | (size_t) | cStringLength | |
Appends a C string with the specified encoding and length to the OFMutableString.
cString | A C string to append |
encoding | The encoding of the C string |
cStringLength | The length of the UTF-8 encoded C string |
- (void) appendFormat: | (OFConstantString*) | format | |
, | ... | ||
Appends a formatted string to the OFMutableString.
See printf for the format syntax. As an addition, %@ is available as format specifier for objects.
format | A format string which generates the string to append |
- (void) appendFormat: | (OFConstantString*) | format | |
withArguments: | (va_list) | arguments | |
Appends a formatted string to the OFMutableString.
See printf for the format syntax. As an addition, %@ is available as format specifier for objects.
format | A format string which generates the string to append |
arguments | The arguments used in the format string |
- (void) appendString: | (OFString*) | string |
Appends another OFString to the OFMutableString.
string | An OFString to append |
- (void) appendUTF8String: | (const char*) | UTF8String |
Appends a UTF-8 encoded C string to the OFMutableString.
UTF8String | A UTF-8 encoded C string to append |
- (void) appendUTF8String: | (const char*) | UTF8String | |
withLength: | (size_t) | UTF8StringLength | |
Appends a UTF-8 encoded C string with the specified length to the OFMutableString.
UTF8String | A UTF-8 encoded C string to append |
UTF8StringLength | The length of the UTF-8 encoded C string |
- (void) deleteCharactersInRange: | (of_range_t) | range |
Deletes the characters at the specified range.
range | The range of the characters which should be removed |
- (void) insertString: | (OFString*) | string | |
atIndex: | (size_t) | index | |
Inserts a string at the specified index.
string | The string to insert |
index | The index |
- (void) prependString: | (OFString*) | string |
Prepends another OFString to the OFMutableString.
string | An OFString to prepend |
- (void) replaceCharactersInRange: | (of_range_t) | range | |
withString: | (OFString*) | replacement | |
Replaces the characters at the specified range.
range | The range of the characters which should be replaced |
replacement | The string to the replace the characters with |
Replaces all occurrences of a string with another string.
string | The string to replace |
replacement | The string with which it should be replaced |
- (void) replaceOccurrencesOfString: | (OFString*) | string | |
withString: | (OFString*) | replacement | |
inRange: | (of_range_t) | range | |
Replaces all occurrences of a string in the specified range with another string.
string | The string to replace |
replacement | The string with which it should be replaced |
range | The range in which the string should be replaced |
- (void) setCharacter: | (of_unichar_t) | character | |
atIndex: | (size_t) | index | |
Sets the character at the specified index.
character | The character to set |
index | The index where to set the character |