|
ObjFW
|
A class for storing constant strings using the @"" literal.
More...
#import <ObjFW/OFConstantString.h>
Additional Inherited Members | |
Instance Methods inherited from OFString | |
| (instancetype) | - init |
| Initializes an already allocated OFString to be empty. | |
| (instancetype) | - initWithUTF8String: |
| Initializes an already allocated OFString from a UTF-8 encoded C string. | |
| (instancetype) | - initWithUTF8String:length: |
| Initializes an already allocated OFString from a UTF-8 encoded C string with the specified length. | |
| (instancetype) | - initWithUTF8StringNoCopy:freeWhenDone: |
| Initializes an already allocated OFString from an UTF-8 encoded C string without copying the string, if possible. | |
| (instancetype) | - initWithUTF8StringNoCopy:length:freeWhenDone: |
| Initializes an already allocated OFString from an UTF-8 encoded C string with the specified length without copying the string, if possible. | |
| (instancetype) | - initWithCString:encoding: |
| Initializes an already allocated OFString from a C string with the specified encoding. | |
| (instancetype) | - initWithCString:encoding:length: |
| Initializes an already allocated OFString from a C string with the specified encoding and length. | |
| (instancetype) | - initWithData:encoding: |
| Initializes an already allocated OFString from OFData with the specified encoding. | |
| (instancetype) | - initWithString: |
| Initializes an already allocated OFString with another string. | |
| (instancetype) | - initWithCharacters:length: |
| Initializes an already allocated OFString with a Unicode string with the specified length. | |
| (instancetype) | - initWithUTF16String: |
| Initializes an already allocated OFString with a UTF-16 string. | |
| (instancetype) | - initWithUTF16String:length: |
| Initializes an already allocated OFString with a UTF-16 string with the specified length. | |
| (instancetype) | - initWithUTF16String:byteOrder: |
| Initializes an already allocated OFString with a UTF-16 string, assuming the specified byte order if no byte order mark is found. | |
| (instancetype) | - initWithUTF16String:length:byteOrder: |
| Initializes an already allocated OFString with a UTF-16 string with the specified length, assuming the specified byte order if no byte order mark is found. | |
| (instancetype) | - initWithUTF32String: |
| Initializes an already allocated OFString with a UTF-32 string. | |
| (instancetype) | - initWithUTF32String:length: |
| Initializes an already allocated OFString with a UTF-32 string with the specified length. | |
| (instancetype) | - initWithUTF32String:byteOrder: |
| Initializes an already allocated OFString with a UTF-32 string, assuming the specified byte order if no byte order mark is found. | |
| (instancetype) | - initWithUTF32String:length:byteOrder: |
| Initializes an already allocated OFString with a UTF-32 string with the specified length, assuming the specified byte order if no byte order mark is found. | |
| (instancetype) | - initWithFormat: |
| Initializes an already allocated OFString with a format string. | |
| (instancetype) | - initWithFormat:arguments: |
| Initializes an already allocated OFString with a format string. | |
| (instancetype) | - initWithContentsOfFile: |
| Initializes an already allocated OFString with the contents of the specified file in the specified encoding. | |
| (instancetype) | - initWithContentsOfFile:encoding: |
| Initializes an already allocated OFString with the contents of the specified file in the specified encoding. | |
| (instancetype) | - initWithContentsOfIRI: |
| Initializes an already allocated OFString with the contents of the specified IRI. | |
| (instancetype) | - initWithContentsOfIRI:encoding: |
| Initializes an already allocated OFString with the contents of the specified IRI in the specified encoding. | |
| (size_t) | - getCString:maxLength:encoding: |
| Writes the OFString into the specified C string with the specified encoding. | |
| (size_t) | - getLossyCString:maxLength:encoding: |
| Writes the OFString into the specified C string with the specified encoding, replacing characters that cannot be represented in the specified encoding with a question mark. | |
| (const char *) | - cStringWithEncoding: |
| Returns the OFString as a C string in the specified encoding. | |
| (const char *) | - lossyCStringWithEncoding: |
| Returns the OFString as a C string in the specified encoding, replacing characters that cannot be represented in the specified encoding with a question mark. | |
| (size_t) | - cStringLengthWithEncoding: |
| Returns the number of bytes the string needs in the specified encoding. | |
| (OFComparisonResult) | - compare: |
| Compares the string to another string. | |
| (OFComparisonResult) | - caseInsensitiveCompare: |
| Compares the string to another string without caring about the case. | |
| (OFUnichar) | - characterAtIndex: |
| Returns the Unicode character at the specified index. | |
| (void) | - getCharacters:inRange: |
| Copies the Unicode characters in the specified range to the specified buffer. | |
| (OFRange) | - rangeOfString: |
| Returns the range of the first occurrence of the string. | |
| (OFRange) | - rangeOfString:options: |
| Returns the range of the string. | |
| (OFRange) | - rangeOfString:options:range: |
| Returns the range of the string in the specified range. | |
| (size_t) | - indexOfCharacterFromSet: |
| Returns the index of the first character from the set. | |
| (size_t) | - indexOfCharacterFromSet:options: |
| Returns the index of the first character from the set. | |
| (size_t) | - indexOfCharacterFromSet:options:range: |
| Returns the index of the first character from the set. | |
| (bool) | - containsString: |
| Returns whether the string contains the specified string. | |
| (OFString *) | - substringFromIndex: |
| Creates a substring from the specified index to the end. | |
| (OFString *) | - substringToIndex: |
| Creates a substring from the beginning to the specified index. | |
| (OFString *) | - substringWithRange: |
| Creates a substring with the specified range. | |
| (long long) | - longLongValueWithBase: |
The value of the string in the specified base as a long long. | |
| (unsigned long long) | - unsignedLongLongValueWithBase: |
The value of the string in the specified base as an unsigned long long. | |
| (OFString *) | - stringByAppendingString: |
| Creates a new string by appending another string. | |
| (OFString *) | - stringByAppendingFormat: |
| Creates a new string by appending the specified format. | |
| (OFString *) | - stringByAppendingFormat:arguments: |
| Creates a new string by appending the specified format. | |
| (OFString *) | - stringByReplacingOccurrencesOfString:withString: |
| Creates a new string by replacing the occurrences of the specified string with the specified replacement. | |
| (OFString *) | - stringByReplacingOccurrencesOfString:withString:options:range: |
| Creates a new string by replacing the occurrences of the specified string in the specified range with the specified replacement. | |
| (bool) | - hasPrefix: |
| Checks whether the string has the specified prefix. | |
| (bool) | - hasSuffix: |
| Checks whether the string has the specified suffix. | |
| (OFArray *) | - componentsSeparatedByString: |
| Separates the string into an array of strings, split by the specified delimiter. | |
| (OFArray *) | - componentsSeparatedByString:options: |
| Separates the string into an array of strings, split by the specified delimiter. | |
| (OFArray *) | - componentsSeparatedByCharactersInSet: |
| Separates the string into an array of strings, split by characters in the specified set. | |
| (OFArray *) | - componentsSeparatedByCharactersInSet:options: |
| Separates the string into an array of strings, split by characters in the specified set. | |
| (const OFChar16 *) | - UTF16StringWithByteOrder: |
| Returns the string in UTF-16 encoding with the specified byte order. | |
| (const OFChar32 *) | - UTF32StringWithByteOrder: |
| Returns the string in UTF-32 encoding with the specified byte order. | |
| (OFData *) | - dataWithEncoding: |
| Returns the string as OFData with the specified encoding. | |
| (void) | - writeToFile: |
| Writes the string into the specified file using UTF-8 encoding. | |
| (void) | - writeToFile:encoding: |
| Writes the string into the specified file using the specified encoding. | |
| (void) | - writeToIRI: |
| Writes the string to the specified IRI using UTF-8 encoding. | |
| (void) | - writeToIRI:encoding: |
| Writes the string to the specified IRI using the specified encoding. | |
| (void) | - enumerateLinesUsingBlock: |
| block The block to call for each line | |
| stringByMD5Hashing | |
| The MD5 hash of the string as a string. | |
| stringByRIPEMD160Hashing | |
| The RIPEMD-160 hash of the string as a string. | |
| stringBySHA1Hashing | |
| The SHA-1 hash of the string as a string. | |
| stringBySHA224Hashing | |
| The SHA-224 hash of the string as a string. | |
| stringBySHA256Hashing | |
| The SHA-256 hash of the string as a string. | |
| stringBySHA384Hashing | |
| The SHA-384 hash of the string as a string. | |
| stringBySHA512Hashing | |
| The SHA-512 hash of the string as a string. | |
| objectByParsingJSON | |
| The string interpreted as JSON and parsed as an object. | |
| objectByParsingJSONWithDepthLimit: | |
| Creates an object from the JSON value of the string. | |
| absolutePath | |
| Whether the path is an absolute path. | |
| pathComponents | |
| The components of the string when interpreted as a path. | |
| lastPathComponent | |
| The last path component of the string when interpreted as a path. | |
| pathExtension | |
| The file extension of string when interpreted as a path. | |
| stringByDeletingLastPathComponent | |
| The directory name of the string when interpreted as a path. | |
| stringByDeletingPathExtension | |
| The string with the file extension of the path removed. | |
| stringByStandardizingPath | |
| The string interpreted as a path with relative sub paths resolved. | |
| pathWithComponents: | |
| Creates a path from the specified path components. | |
| stringByAppendingPathComponent: | |
| Creates a new string by appending a path component. | |
| stringByAppendingPathExtension: | |
| Creates a new string by appending a path extension. | |
| stringByRemovingPercentEncoding | |
| The string with percent encoding removed. | |
| stringByAddingPercentEncodingWithAllowedCharacters: | |
| Percent-encodes a string for use in an IRI, but does not escape the specified allowed characters. | |
| objectByParsingPropertyList | |
| The string interpreted as a property list and parsed as an object. | |
| stringByXMLEscaping | |
| The string in a form escaped for use in an XML document. | |
| stringByXMLUnescaping | |
| The string with XML entities unescapted. | |
| stringByXMLUnescapingWithDelegate: | |
| Unescapes XML in the string and uses the specified delegate for unknown entities. | |
| stringByXMLUnescapingWithBlock: | |
| Unescapes XML in the string and uses the specified block for unknown entities. | |
Instance Methods inherited from OFObject | |
| (instancetype) | - init |
| Initializes an already allocated object. | |
| (nullable OFMethodSignature *) | - methodSignatureForSelector: |
| Returns the method signature for the specified selector. | |
| (void) | - dealloc |
| Deallocates the object. | |
| (void) | - performSelector:afterDelay: |
| Performs the specified selector after the specified delay. | |
| (void) | - performSelector:withObject:afterDelay: |
| Performs the specified selector with the specified object after the specified delay. | |
| (void) | - performSelector:withObject:withObject:afterDelay: |
| Performs the specified selector with the specified objects after the specified delay. | |
| (void) | - performSelector:withObject:withObject:withObject:afterDelay: |
| Performs the specified selector with the specified objects after the specified delay. | |
| (void) | - performSelector:withObject:withObject:withObject:withObject:afterDelay: |
| Performs the specified selector with the specified objects after the specified delay. | |
| (void) | - performSelector:onThread:waitUntilDone: |
| Performs the specified selector on the specified thread. | |
| (void) | - performSelector:onThread:withObject:waitUntilDone: |
| Performs the specified selector on the specified thread with the specified object. | |
| (void) | - performSelector:onThread:withObject:withObject:waitUntilDone: |
| Performs the specified selector on the specified thread with the specified objects. | |
| (void) | - performSelector:onThread:withObject:withObject:withObject:waitUntilDone: |
| Performs the specified selector on the specified thread with the specified objects. | |
| (void) | - performSelector:onThread:withObject:withObject:withObject:withObject:waitUntilDone: |
| Performs the specified selector on the specified thread with the specified objects. | |
| (void) | - performSelectorOnMainThread:waitUntilDone: |
| Performs the specified selector on the main thread. | |
| (void) | - performSelectorOnMainThread:withObject:waitUntilDone: |
| Performs the specified selector on the main thread with the specified object. | |
| (void) | - performSelectorOnMainThread:withObject:withObject:waitUntilDone: |
| Performs the specified selector on the main thread with the specified objects. | |
| (void) | - performSelectorOnMainThread:withObject:withObject:withObject:waitUntilDone: |
| Performs the specified selector on the main thread with the specified objects. | |
| (void) | - performSelectorOnMainThread:withObject:withObject:withObject:withObject:waitUntilDone: |
| Performs the specified selector on the main thread with the specified objects. | |
| (void) | - performSelector:onThread:afterDelay: |
| Performs the specified selector on the specified thread after the specified delay. | |
| (void) | - performSelector:onThread:withObject:afterDelay: |
| Performs the specified selector on the specified thread with the specified object after the specified delay. | |
| (void) | - performSelector:onThread:withObject:withObject:afterDelay: |
| Performs the specified selector on the specified thread with the specified objects after the specified delay. | |
| (void) | - performSelector:onThread:withObject:withObject:withObject:afterDelay: |
| Performs the specified selector on the specified thread with the specified objects after the specified delay. | |
| (void) | - performSelector:onThread:withObject:withObject:withObject:withObject:afterDelay: |
| Performs the specified selector on the specified thread with the specified objects after the specified delay. | |
| (nullable id) | - forwardingTargetForSelector: |
| This method is called when resolveClassMethod: or resolveInstanceMethod: returned false. It should return a target to which the message should be forwarded. | |
| (void) | - doesNotRecognizeSelector: |
| Handles messages which are not understood by the receiver. | |
Instance Methods inherited from <OFObject> | |
| (Class) | - class |
| Returns the class of the object. | |
| (nullable Class) | - superclass |
| Returns the superclass of the object. | |
| (unsigned long) | - hash |
| Returns a hash for the object. | |
| (unsigned int) | - retainCount |
| Returns the retain count. | |
| (bool) | - isProxy |
| Returns whether the object is a proxy object. | |
| (bool) | - isKindOfClass: |
| Returns a boolean whether the object is of the specified kind. | |
| (bool) | - isMemberOfClass: |
| Returns a boolean whether the object is a member of the specified class. | |
| (bool) | - respondsToSelector: |
| Returns a boolean whether the object responds to the specified selector. | |
| (bool) | - conformsToProtocol: |
| Checks whether the object conforms to the specified protocol. | |
| (nullable IMP) | - methodForSelector: |
| Returns the implementation for the specified selector. | |
| (nullable id) | - performSelector: |
| Performs the specified selector. | |
| (nullable id) | - performSelector:withObject: |
| Performs the specified selector with the specified object. | |
| (nullable id) | - performSelector:withObject:withObject: |
| Performs the specified selector with the specified objects. | |
| (nullable id) | - performSelector:withObject:withObject:withObject: |
| Performs the specified selector with the specified objects. | |
| (nullable id) | - performSelector:withObject:withObject:withObject:withObject: |
| Performs the specified selector with the specified objects. | |
| (bool) | - isEqual: |
| Checks two objects for equality. | |
| (instancetype) | - retain |
| Increases the retain count. | |
| (void) | - release |
| Decreases the retain count. | |
| (instancetype) | - autorelease |
| Adds the object to the topmost autorelease pool of the thread's autorelease pool stack. | |
| (instancetype) | - self |
| Returns the receiver. | |
| (bool) | - allowsWeakReference |
| Returns whether the object allows a weak reference. | |
| (bool) | - retainWeakReference |
| Retain a weak reference to this object. | |
Instance Methods inherited from <OFCopying> | |
| (id) | - copy |
| Copies the object. | |
Instance Methods inherited from <OFMutableCopying> | |
| (id) | - mutableCopy |
| Creates a mutable copy of the object. | |
Instance Methods inherited from <OFComparing> | |
| (OFComparisonResult) | - compare: |
| Compares the object to another object. | |
Instance Methods inherited from <OFJSONRepresentation> | |
| (OFString *) | - JSONRepresentationWithOptions: |
| Returns the JSON representation of the object as a string. | |
Class Methods inherited from OFString | |
| (instancetype) | + string |
| Creates a new OFString. | |
| (instancetype) | + stringWithUTF8String: |
| Creates a new OFString from a UTF-8 encoded C string. | |
| (instancetype) | + stringWithUTF8String:length: |
| Creates a new OFString from a UTF-8 encoded C string with the specified length. | |
| (instancetype) | + stringWithUTF8StringNoCopy:freeWhenDone: |
| Creates a new OFString from a UTF-8 encoded C string without copying the string, if possible. | |
| (instancetype) | + stringWithUTF8StringNoCopy:length:freeWhenDone: |
| Creates a new OFString from a UTF-8 encoded C string with the specified length without copying the string, if possible. | |
| (instancetype) | + stringWithCString:encoding: |
| Creates a new OFString from a C string with the specified encoding. | |
| (instancetype) | + stringWithCString:encoding:length: |
| Creates a new OFString from a C string with the specified encoding and length. | |
| (instancetype) | + stringWithData:encoding: |
| Creates a new OFString from OFData with the specified encoding. | |
| (instancetype) | + stringWithString: |
| Creates a new OFString from another string. | |
| (instancetype) | + stringWithCharacters:length: |
| Creates a new OFString from a Unicode string with the specified length. | |
| (instancetype) | + stringWithUTF16String: |
| Creates a new OFString from a UTF-16 encoded string. | |
| (instancetype) | + stringWithUTF16String:length: |
| Creates a new OFString from a UTF-16 encoded string with the specified length. | |
| (instancetype) | + stringWithUTF16String:byteOrder: |
| Creates a new OFString from a UTF-16 encoded string, assuming the specified byte order if no byte order mark is found. | |
| (instancetype) | + stringWithUTF16String:length:byteOrder: |
| Creates a new OFString from a UTF-16 encoded string with the specified length, assuming the specified byte order if no byte order mark is found. | |
| (instancetype) | + stringWithUTF32String: |
| Creates a new OFString from a UTF-32 encoded string. | |
| (instancetype) | + stringWithUTF32String:length: |
| Creates a new OFString from a UTF-32 encoded string with the specified length. | |
| (instancetype) | + stringWithUTF32String:byteOrder: |
| Creates a new OFString from a UTF-32 encoded string, assuming the specified byte order if no byte order mark is found. | |
| (instancetype) | + stringWithUTF32String:length:byteOrder: |
| Creates a new OFString from a UTF-32 encoded string with the specified length, assuming the specified byte order if no byte order mark is found. | |
| (instancetype) | + stringWithFormat: |
| Creates a new OFString from a format string. | |
| (instancetype) | + stringWithContentsOfFile: |
| Creates a new OFString with the contents of the specified UTF-8 encoded file. | |
| (instancetype) | + stringWithContentsOfFile:encoding: |
| Creates a new OFString with the contents of the specified file in the specified encoding. | |
| (instancetype) | + stringWithContentsOfIRI: |
| Creates a new OFString with the contents of the specified IRI. | |
| (instancetype) | + stringWithContentsOfIRI:encoding: |
| Creates a new OFString with the contents of the specified IRI in the specified encoding. | |
Class Methods inherited from OFObject | |
| (void) | + load |
| A method which is called once when the class is loaded into the runtime. | |
| (void) | + unload |
| A method which is called when the class is unloaded from the runtime. | |
| (void) | + initialize |
| A method which is called the moment before the first call to the class is being made. | |
| (instancetype) | + alloc |
| Allocates memory for an instance of the class and sets up the memory pool for the object. | |
| (Class) | + class |
| Returns the class. | |
| (OFString *) | + className |
| Returns the name of the class as a string. | |
| (bool) | + isSubclassOfClass: |
| Returns a boolean whether the class is a subclass of the specified class. | |
| (nullable Class) | + superclass |
| Returns the superclass of the class. | |
| (bool) | + instancesRespondToSelector: |
| Checks whether instances of the class respond to a given selector. | |
| (bool) | + conformsToProtocol: |
| Checks whether the class conforms to a given protocol. | |
| (nullable IMP) | + instanceMethodForSelector: |
| Returns the implementation of the instance method for the specified selector. | |
| (nullable OFMethodSignature *) | + instanceMethodSignatureForSelector: |
| Returns the method signature of the instance method for the specified selector. | |
| (OFString *) | + description |
| Returns a description for the class, which is usually the class name. | |
| (nullable IMP) | + replaceClassMethod:withMethodFromClass: |
| Replaces a class method with a class method from another class. | |
| (nullable IMP) | + replaceInstanceMethod:withMethodFromClass: |
| Replaces an instance method with an instance method from another class. | |
| (void) | + inheritMethodsFromClass: |
| Adds all methods from the specified class to the class that is the receiver. | |
| (bool) | + resolveClassMethod: |
| Try to resolve the specified class method. | |
| (bool) | + resolveInstanceMethod: |
| Try to resolve the specified instance method. | |
| (id) | + copy |
| Returns the class. | |
Properties inherited from OFString | |
| size_t | length |
| The length of the string in Unicode codepoints. | |
| const char * | UTF8String |
| The OFString as a UTF-8 encoded C string. | |
| size_t | UTF8StringLength |
| The number of bytes the string needs in UTF-8 encoding. | |
| OFString * | uppercaseString |
| The string in uppercase. | |
| OFString * | lowercaseString |
| The string in lowercase. | |
| OFString * | capitalizedString |
| The string in capitalized form. | |
| long long | longLongValue |
The decimal value of the string as a long long. | |
| unsigned long long | unsignedLongLongValue |
The decimal value of the string as an unsigned long long. | |
| float | floatValue |
| The float value of the string as a float. | |
| double | doubleValue |
| The double value of the string as a double. | |
| const OFUnichar * | characters |
| The string as an array of Unicode characters. | |
| const OFChar16 * | UTF16String |
| The string in UTF-16 encoding with native byte order. | |
| size_t | UTF16StringLength |
| The length of the string in UTF-16 characters. | |
| const OFChar32 * | UTF32String |
| The string in UTF-32 encoding with native byte order. | |
| OFString * | stringByDeletingLeadingWhitespaces |
| The string with leading whitespaces deleted. | |
| OFString * | stringByDeletingTrailingWhitespaces |
| The string with trailing whitespaces deleted. | |
| OFString * | stringByDeletingEnclosingWhitespaces |
| The string with leading and trailing whitespaces deleted. | |
| OFString * | stringByExpandingWindowsEnvironmentStrings |
| The string with the Windows Environment Strings expanded. | |
Properties inherited from OFObject | |
| OFString * | className |
| The name of the object's class. | |
| OFString * | description |
| A description for the object. | |
Properties inherited from <OFJSONRepresentation> | |
| OFString * | JSONRepresentation |
| The JSON representation of the object as a string. | |
Properties inherited from <OFMessagePackRepresentation> | |
| OFData * | messagePackRepresentation |
| The MessagePack representation of the object as OFData. | |
A class for storing constant strings using the @"" literal.