objc

Instance Methods
NXConstantString Class Reference

A constant string class. More...

#import <objc/objc.h>

Inheritance diagram for NXConstantString:
Inheritance graph
[legend]
Collaboration diagram for NXConstantString:
Collaboration graph
[legend]

Instance Methods

(const char *) - cStr
 Returns the C-string representation of the constant string. More...
 
(unsigned int) - length
 Returns the length of the constant string. More...
 
- Instance Methods inherited from Object
(void) - dealloc
 Free resources for an existing instance.
 
(id- init
 Initialize the instance, after allocation. More...
 
(Class- class
 Returns the class of the instance. More...
 
(Class- superclass
 Returns the superclass of the instance. More...
 
(BOOL- isEqual:
 Compares the receiver to another object for equality. More...
 
(BOOL- isKindOfClass:
 Returns a Boolean value that indicates whether the receiver is an instance of a given class. More...
 
(BOOL- conformsTo:
 Checks if the receiver's class conforms to a protocol. More...
 
(NXString *) - description
 Returns a string that represents the instance. More...
 
- Instance Methods inherited from <ObjectProtocol>
(BOOL- respondsToSelector:
 Checks if the receiver responds to a selector. More...
 

Additional Inherited Members

- Class Methods inherited from Object
(void) + initialize
 Performs one-time initialization for the class. More...
 
(id+ alloc
 Allocate a new class instance. More...
 
(Class+ class
 Returns the class object. More...
 
(Class+ superclass
 Returns the superclass of the class. More...
 
(const char *) + name
 Returns the name of the class. More...
 
(BOOL+ conformsTo:
 Checks if the class conforms to a protocol. More...
 
(NXString *) + description
 Returns a string that represents the class. More...
 
- Protected Attributes inherited from Object
Class isa
 A pointer to the object's class structure. More...
 

Detailed Description

A constant string class.

This class is used to represent immutable strings. It stores a pointer to a C-string and its length. For compatibility with modern Objective-C code, it is aliased to NSString when compiling with Clang.

Definition at line 20 of file NXConstantString.h.

Method Documentation

◆ cStr()

- (const char *) cStr

Returns the C-string representation of the constant string.

Returns
A pointer to the null-terminated C-string.

Reimplemented from <NXConstantStringProtocol>.

◆ length()

- (unsigned int) length

Returns the length of the constant string.

Returns
The length of the string in bytes, not including the null terminator.

Reimplemented from <NXConstantStringProtocol>.


The documentation for this class was generated from the following file: