ObjFW
|
A class for handling strings. More...
#include <OFString.h>
A class for handling strings.
of_comparison_result_t OFString::caseInsensitiveCompare: | ( | OFString* | str | ) | [virtual] |
of_unichar_t OFString::characterAtIndex: | ( | size_t | index | ) | [virtual] |
index | The index of the Unicode character to return |
BOOL OFString::containsString: | ( | OFString* | str | ) | [virtual] |
str | The string to search |
const char * OFString::cString | ( | ) | [virtual] |
size_t OFString::cStringLength | ( | ) | [virtual] |
intmax_t OFString::decimalValue | ( | ) | [virtual] |
Returns the decimal value of the string as an intmax_t or throws an OFInvalidEncodingException if the string contains any non-number characters. Leading and trailing whitespaces are ignored.
If the number is too big to fit into an intmax_t, an OFOutOfRangeException is thrown.
double OFString::doubleValue | ( | ) | [virtual] |
Returns the double value of the string as a float or throws an OFInvalidEncodingException if the string contains any non-number characters.
float OFString::floatValue | ( | ) | [virtual] |
Returns the float value of the string as a float or throws an OFInvalidEncodingException if the string contains any non-number characters.
BOOL OFString::hasPrefix: | ( | OFString* | prefix | ) | [virtual] |
Checks whether the string has the specified prefix.
prefix | The prefix to check for |
BOOL OFString::hasSuffix: | ( | OFString* | suffix | ) | [virtual] |
Checks whether the string has the specified suffix.
suffix | The suffix to check for |
uintmax_t OFString::hexadecimalValue | ( | ) | [virtual] |
Returns the hexadecimal value of the string as an uintmax_t or throws an OFInvalidEncodingException if the string contains any non-number characters. Leading and trailing whitespaces are ignored.
If the number is too big to fit into an uintmax_t, an OFOutOfRangeException is thrown.
size_t OFString::indexOfFirstOccurrenceOfString: | ( | OFString* | str | ) | [virtual] |
str | The string to search |
size_t OFString::indexOfLastOccurrenceOfString: | ( | OFString* | str | ) | [virtual] |
str | The string to search |
id OFString::initWithContentsOfFile: | ( | OFString* | path | ) | [virtual] |
id OFString::initWithContentsOfFile:encoding: | ( | OFString* | path, |
[encoding] of_string_encoding_t | encoding | ||
) | [virtual] |
id OFString::initWithContentsOfURL: | ( | OFURL* | url | ) | [virtual] |
id OFString::initWithContentsOfURL:encoding: | ( | OFURL* | url, |
[encoding] of_string_encoding_t | encoding | ||
) | [virtual] |
id OFString::initWithCString: | ( | const char* | str | ) | [virtual] |
id OFString::initWithCString:encoding: | ( | const char* | str, |
[encoding] of_string_encoding_t | encoding | ||
) | [virtual] |
id OFString::initWithCString:encoding:length: | ( | const char* | str, |
[encoding] of_string_encoding_t | encoding, | ||
[length] size_t | len | ||
) | [virtual] |
id OFString::initWithCString:length: | ( | const char* | str, |
[length] size_t | len | ||
) | [virtual] |
id OFString::initWithFormat: | ( | OFString* | fmt, |
[,] | ... | ||
) | [virtual] |
id OFString::initWithFormat:arguments: | ( | OFString* | fmt, |
[arguments] va_list | args | ||
) | [virtual] |
id OFString::initWithPath: | ( | OFString* | first, |
[,] | ... | ||
) | [virtual] |
id OFString::initWithPath:arguments: | ( | OFString* | first, |
[arguments] va_list | args | ||
) | [virtual] |
id OFString::initWithString: | ( | OFString* | str | ) | [virtual] |
OFString * OFString::lastPathComponent | ( | ) | [virtual] |
size_t OFString::length | ( | ) | [virtual] |
OFArray * OFString::pathComponents | ( | ) | [virtual] |
id OFString::string | ( | ) | [static, virtual] |
Creates a new string by appending another string.
str | The string to append |
OFString * OFString::stringByDeletingLastPathComponent | ( | ) | [virtual] |
OFString * OFString::stringByDeletingLeadingAndTrailingWhitespaces | ( | ) | [virtual] |
Creates a new string by deleting leading and trailing whitespaces.
OFString * OFString::stringByDeletingLeadingWhitespaces | ( | ) | [virtual] |
Creates a new string by deleting leading whitespaces.
OFString * OFString::stringByDeletingTrailingWhitespaces | ( | ) | [virtual] |
Creates a new string by deleting trailing whitespaces.
Decodes a string used in a URL.
Encodes a string for use in a URL.
Escapes a string for use in an XML document.
OFString* OFString(XMLUnescaping)::stringByXMLUnescapingWithBlock: | ( | of_string_xml_unescaping_block_t | block | ) | [virtual] |
Unescapes XML in the string and uses the specified block for unknown entities.
block | A block which handles unknown entities |
OFString* OFString(XMLUnescaping)::stringByXMLUnescapingWithDelegate: | ( | id< OFStringXMLUnescapingDelegate > | delegate | ) | [virtual] |
Unescapes XML in the string and uses the specified delegate for unknown entities.
delegate | An OFXMLUnescapingDelegate as a handler for unknown entities |
id OFString::stringWithContentsOfFile: | ( | OFString* | path | ) | [static, virtual] |
id OFString::stringWithContentsOfFile:encoding: | ( | OFString* | path, |
[encoding] of_string_encoding_t | encoding | ||
) | [static, virtual] |
id OFString::stringWithContentsOfURL: | ( | OFURL* | url | ) | [static, virtual] |
id OFString::stringWithContentsOfURL:encoding: | ( | OFURL* | url, |
[encoding] of_string_encoding_t | encoding | ||
) | [static, virtual] |
id OFString::stringWithCString: | ( | const char* | str | ) | [static, virtual] |
id OFString::stringWithCString:encoding: | ( | const char* | str, |
[encoding] of_string_encoding_t | encoding | ||
) | [static, virtual] |
id OFString::stringWithCString:encoding:length: | ( | const char* | str, |
[encoding] of_string_encoding_t | encoding, | ||
[length] size_t | len | ||
) | [static, virtual] |
id OFString::stringWithCString:length: | ( | const char* | str, |
[length] size_t | len | ||
) | [static, virtual] |
id OFString::stringWithFormat: | ( | OFString* | fmt, |
[,] | ... | ||
) | [static, virtual] |
id OFString::stringWithPath: | ( | OFString* | first, |
[,] | ... | ||
) | [static, virtual] |
id OFString::stringWithString: | ( | OFString* | str | ) | [static, virtual] |
OFString * OFString::substringFromIndex:toIndex: | ( | size_t | start, |
[toIndex] size_t | end | ||
) | [virtual] |
start | The index where the substring starts |
end | The index where the substring ends. This points BEHIND the last character! |
OFString * OFString::substringWithRange: | ( | of_range_t | range | ) | [virtual] |
range | The range of the substring |
of_unichar_t * OFString::unicodeString | ( | ) | [virtual] |
Returns the string as an array of of_unichar_t. The result needs to be free()'d by the caller, as the memory is not marked as belonging to the object.
void OFString::writeToFile: | ( | OFString* | path | ) | [virtual] |
Writes the string into the specified file using UTF-8 encoding.
path | The path of the file to write to |