ObjFW
Public Member Functions
OFMutableString Class Reference

A class for storing and modifying strings. More...

#import <OFMutableString.h>

Inheritance diagram for OFMutableString:
OFString OFObject <OFCopying> <OFMutableCopying> <OFComparing> <OFSerialization> <OFJSON> <OFObject> <OFObject>

List of all members.

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.

Detailed Description

A class for storing and modifying strings.


Member Function Documentation

- (void) appendCString: (const char*)  cString
withEncoding: (of_string_encoding_t)  encoding 

Appends a C string with the specified encoding to the OFMutableString.

Parameters:
cStringA C string to append
encodingThe 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.

Parameters:
cStringA C string to append
encodingThe encoding of the C string
cStringLengthThe 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.

Parameters:
formatA 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.

Parameters:
formatA format string which generates the string to append
argumentsThe arguments used in the format string
- (void) appendString: (OFString*)  string

Appends another OFString to the OFMutableString.

Parameters:
stringAn OFString to append
- (void) appendUTF8String: (const char*)  UTF8String

Appends a UTF-8 encoded C string to the OFMutableString.

Parameters:
UTF8StringA 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.

Parameters:
UTF8StringA UTF-8 encoded C string to append
UTF8StringLengthThe length of the UTF-8 encoded C string
- (void) deleteCharactersInRange: (of_range_t range

Deletes the characters at the specified range.

Parameters:
rangeThe range of the characters which should be removed
- (void) insertString: (OFString*)  string
atIndex: (size_t)  index 

Inserts a string at the specified index.

Parameters:
stringThe string to insert
indexThe index
- (void) prependString: (OFString*)  string

Prepends another OFString to the OFMutableString.

Parameters:
stringAn OFString to prepend
- (void) replaceCharactersInRange: (of_range_t range
withString: (OFString*)  replacement 

Replaces the characters at the specified range.

Parameters:
rangeThe range of the characters which should be replaced
replacementThe string to the replace the characters with
- (void) replaceOccurrencesOfString: (OFString*)  string
withString: (OFString*)  replacement 

Replaces all occurrences of a string with another string.

Parameters:
stringThe string to replace
replacementThe 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.

Parameters:
stringThe string to replace
replacementThe string with which it should be replaced
rangeThe 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.

Parameters:
characterThe character to set
indexThe index where to set the character

The documentation for this class was generated from the following files:
 All Classes Functions Variables Properties