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>

List of all members.

Public Member Functions

(void) - setToCString:
(void) - appendCString:
(void) - appendCString:withLength:
(void) - appendCStringWithoutUTF8Checking:
(void) - appendCStringWithoutUTF8Checking:length:
(void) - appendString:
(void) - appendFormat:
(void) - appendFormat:withArguments:
(void) - prependString:
(void) - reverse
(void) - upper
(void) - lower
(void) - insertString:atIndex:
(void) - removeCharactersFromIndex:toIndex:
(void) - removeCharactersInRange:
(void) - replaceCharactersFromIndex:toIndex:withString:
(void) - replaceCharactersInRange:withString:
(void) - replaceOccurrencesOfString:withString:
(void) - removeLeadingWhitespaces
(void) - removeTrailingWhitespaces
(void) - removeLeadingAndTrailingWhitespaces

Detailed Description

A class for storing and modifying strings.


Member Function Documentation

- (void) appendCString: (const char*)  str  

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

Parameters:
str A UTF-8 encoded C string to append
- (void) appendCString: (const char*)  str
withLength: (size_t)  len 

Appends a UTF-8 encoded C string with the specified length to the OFString.

Parameters:
str A UTF-8 encoded C string to append
len The length of the UTF-8 encoded C string
- (void) appendCStringWithoutUTF8Checking: (const char*)  str  

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!

Parameters:
str A UTF-8 encoded C string to append
- (void) appendCStringWithoutUTF8Checking: (const char*)  str
length: (size_t)  len 

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!

Parameters:
str A UTF-8 encoded C string to append
len The length of the UTF-8 encoded C string
- (void) appendFormat: (OFString*)  fmt
,   ... 

Appends a formatted UTF-8 encoded C string to the OFString. See printf for the format syntax.

Parameters:
fmt A format string which generates the string to append
- (void) appendFormat: (OFString*)  fmt
withArguments: (va_list)  args 

Appends a formatted UTF-8 encoded C string to the OFString. See printf for the format syntax.

Parameters:
fmt A format string which generates the string to append
args The arguments used in the format string
- (void) appendString: (OFString*)  str  

Appends another OFString to the OFString.

Parameters:
str An OFString to append
- (void) insertString: (OFString*)  str
atIndex: (size_t)  idx 

Inserts a string at the specified index.

Parameters:
str The string to insert
idx The index
- (void) lower  

Lower the OFString.

- (void) prependString: (OFString*)  str  

Prepends another OFString to the OFString.

Parameters:
str An OFString to prepend
- (void) removeCharactersFromIndex: (size_t)  start
toIndex: (size_t)  end 

Removes the characters at the specified range.

Parameters:
start The index where the deletion should be started
end The index until which the characters should be deleted. This points BEHIND the last character!
- (void) removeCharactersInRange: (of_range_t range  

Removes the characters at the specified range.

Parameters:
range The range of the characters which should be removed
- (void) removeLeadingAndTrailingWhitespaces  

Removes all whitespaces at the beginning and the end of a string.

- (void) removeLeadingWhitespaces  

Removes all whitespaces at the beginning of a string.

- (void) removeTrailingWhitespaces  

Removes all whitespaces at the end of a string.

- (void) replaceCharactersFromIndex: (size_t)  start
toIndex: (size_t)  end
withString: (OFString*)  repl 

Removes the characters at the specified range.

Parameters:
start The index where the replacement should be started
end The index until which the characters should be replaced. This points BEHIND the last character!
repl The string to the replace the characters with
- (void) replaceCharactersInRange: (of_range_t range
withString: (OFString*)  repl 

Removes the characters at the specified range.

Parameters:
range The range of the characters which should be replaced
repl The string to the replace the characters with
- (void) replaceOccurrencesOfString: (OFString*)  str
withString: (OFString*)  repl 

Replaces all occurrences of a string with another string.

Parameters:
str The string to replace
repl The string with which it should be replaced
- (void) reverse  

Reverse the OFString.

- (void) setToCString: (const char*)  str  

Sets the OFString to the specified UTF-8 encoded C string.

Parameters:
str A UTF-8 encoded C string to set the OFString to.
- (void) upper  

Upper the OFString.


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