objc

Instance Methods
<NXConstantStringProtocol> Protocol Reference

Protocol for constant string objects. More...

#import <objc/objc.h>

Inheritance diagram for <NXConstantStringProtocol>:
Inheritance graph
[legend]

Instance Methods

(const char *) - cStr
 Returns the C string representation of the string. More...
 
(unsigned int) - length
 Returns the length of the string in bytes. More...
 

Detailed Description

Protocol for constant string objects.

The NXConstantStringProtocol defines the minimal interface that constant string objects must implement to provide basic string functionality. This enables different string implementations to be used polymorphically throughout the framework.

Classes conforming to this protocol can be used wherever basic string operations such as accessing the C string representation or getting the length are required.

Definition at line 33 of file NXConstantString+Protocol.h.

Method Documentation

◆ cStr()

- (const char *) cStr
required

Returns the C string representation of the string.

Returns
A pointer to a null-terminated C string containing the string's content. The returned pointer should not be modified or freed by the caller.

Reimplemented in NXString, and NXConstantString.

◆ length()

- (unsigned int) length
required

Returns the length of the string in bytes.

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

Reimplemented in NXString, and NXConstantString.


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