ObjFW
Public Member Functions
OFMutableString Class Reference

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

#include <OFMutableString.h>

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

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:
strA 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:
strA UTF-8 encoded C string to append
lenThe 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:
strA 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:
strA UTF-8 encoded C string to append
lenThe 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:
fmtA 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:
fmtA format string which generates the string to append
argsThe arguments used in the format string
void OFMutableString::appendString: ( OFString str) [virtual]

Appends another OFString to the OFString.

Parameters:
strAn OFString to append
void OFMutableString::deleteCharactersFromIndex:toIndex: ( size_t  start,
[toIndex] size_t  end 
) [virtual]

Deletes the characters at the specified range.

Parameters:
startThe index where the deletion should be started
endThe 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:
rangeThe 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:
strThe string to insert
idxThe index
void OFMutableString::lower ( ) [virtual]

Lower the OFString.

void OFMutableString::prependString: ( OFString str) [virtual]

Prepends another OFString to the OFString.

Parameters:
strAn OFString to prepend
void OFMutableString::replaceCharactersFromIndex:toIndex:withString: ( size_t  start,
[toIndex] size_t  end,
[withString] OFString repl 
) [virtual]

Replaces the characters at the specified range.

Parameters:
startThe index where the replacement should be started
endThe index until which the characters should be replaced. This points BEHIND the last character!
replThe 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:
rangeThe range of the characters which should be replaced
replThe 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:
strThe string to replace
replThe string with which it should be replaced
void OFMutableString::reverse ( ) [virtual]

Reverse the OFString.

void OFMutableString::setToCString: ( const char*  str) [virtual]

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

Parameters:
strA UTF-8 encoded C string to set the OFString to.
void OFMutableString::upper ( ) [virtual]

Upper the OFString.


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