A class for storing and modifying strings.
More...
#include <OFMutableString.h>
List of all members.
Public Member Functions |
void | setToCString: (const char *str) |
void | appendCString: (const char *str) |
void | appendCString:withLength: (const char *str,[withLength] size_t len) |
void | appendCStringWithoutUTF8Checking: (const char *str) |
void | appendCStringWithoutUTF8Checking:length: (const char *str,[length] size_t len) |
void | appendString: (OFString *str) |
void | appendFormat: (OFString *fmt,[,]...) |
void | appendFormat:withArguments: (OFString *fmt,[withArguments] va_list args) |
void | prependString: (OFString *str) |
void | reverse () |
void | upper () |
void | lower () |
void | insertString:atIndex: (OFString *str,[atIndex] size_t idx) |
void | deleteCharactersFromIndex:toIndex: (size_t start,[toIndex] size_t end) |
void | deleteCharactersInRange: (of_range_t range) |
void | replaceCharactersFromIndex:toIndex:withString: (size_t start,[toIndex] size_t end,[withString] OFString *repl) |
void | replaceCharactersInRange:withString: (of_range_t range,[withString] OFString *repl) |
void | replaceOccurrencesOfString:withString: (OFString *str,[withString] OFString *repl) |
void | deleteLeadingWhitespaces () |
void | deleteTrailingWhitespaces () |
void | deleteLeadingAndTrailingWhitespaces () |
Detailed Description
A class for storing and modifying strings.
Member Function Documentation
void OFMutableString::appendCString: |
( |
const char* |
str | ) |
[virtual] |
Appends a UTF-8 encoded C string to the OFString.
- Parameters:
-
str | A UTF-8 encoded C string to append |
void OFMutableString::appendCString:withLength: |
( |
const char* |
str, |
|
|
[withLength] size_t |
len |
|
) |
| [virtual] |
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 OFMutableString::appendCStringWithoutUTF8Checking: |
( |
const char* |
str | ) |
[virtual] |
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 OFMutableString::appendCStringWithoutUTF8Checking:length: |
( |
const char* |
str, |
|
|
[length] size_t |
len |
|
) |
| [virtual] |
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 OFMutableString::appendFormat: |
( |
OFString* |
fmt, |
|
|
[,] |
... |
|
) |
| [virtual] |
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 OFMutableString::appendFormat:withArguments: |
( |
OFString* |
fmt, |
|
|
[withArguments] va_list |
args |
|
) |
| [virtual] |
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 OFMutableString::appendString: |
( |
OFString* |
str | ) |
[virtual] |
void OFMutableString::deleteCharactersFromIndex:toIndex: |
( |
size_t |
start, |
|
|
[toIndex] size_t |
end |
|
) |
| [virtual] |
Deletes 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 OFMutableString::deleteCharactersInRange: |
( |
of_range_t |
range | ) |
[virtual] |
Deletes the characters at the specified range.
- Parameters:
-
range | The range of the characters which should be removed |
void OFMutableString::deleteLeadingAndTrailingWhitespaces |
( |
| ) |
[virtual] |
Deletes all whitespaces at the beginning and the end of a string.
void OFMutableString::deleteLeadingWhitespaces |
( |
| ) |
[virtual] |
Deletes all whitespaces at the beginning of a string.
void OFMutableString::deleteTrailingWhitespaces |
( |
| ) |
[virtual] |
Deletes all whitespaces at the end of a string.
void OFMutableString::insertString:atIndex: |
( |
OFString* |
str, |
|
|
[atIndex] size_t |
idx |
|
) |
| [virtual] |
Inserts a string at the specified index.
- Parameters:
-
str | The string to insert |
idx | The index |
void OFMutableString::lower |
( |
| ) |
[virtual] |
void OFMutableString::prependString: |
( |
OFString* |
str | ) |
[virtual] |
void OFMutableString::replaceCharactersFromIndex:toIndex:withString: |
( |
size_t |
start, |
|
|
[toIndex] size_t |
end, |
|
|
[withString] OFString* |
repl |
|
) |
| [virtual] |
Replaces 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 OFMutableString::replaceCharactersInRange:withString: |
( |
of_range_t |
range, |
|
|
[withString] OFString* |
repl |
|
) |
| [virtual] |
Deletes 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 OFMutableString::replaceOccurrencesOfString:withString: |
( |
OFString* |
str, |
|
|
[withString] OFString* |
repl |
|
) |
| [virtual] |
Deletes all occurrences of a string with another string.
- Parameters:
-
str | The string to replace |
repl | The string with which it should be replaced |
void OFMutableString::reverse |
( |
| ) |
[virtual] |
void OFMutableString::setToCString: |
( |
const char* |
str | ) |
[virtual] |
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 OFMutableString::upper |
( |
| ) |
[virtual] |
The documentation for this class was generated from the following files: