picofuse-objc

NXString.h
Go to the documentation of this file.
1 
5 #pragma once
6 #include <stdarg.h>
7 #include <stddef.h>
8 
9 @class NXArray;
10 
53 @interface NXString : NXObject
54 
58 + (id)string;
59 
63 + (id)stringWithString:(NXString *)other;
64 
69 + (id)stringWithCString:(const char *)cStr;
70 
74 + (id)stringWithFormat:(NXString *)format, ...;
75 
80 - (id)initWithBytes:(const void *)bytes length:(size_t)length;
81 
86 - (id)initWithString:(NXString *)other;
87 
97 + (id)stringWithQuotedString:(NXString *)quoted;
98 
102 - (id)initWithQuotedString:(NXString *)quoted;
103 
108 - (id)initWithCString:(const char *)cStr;
109 
113 - (id)initWithFormat:(NXString *)format, ...;
114 
118 - (id)initWithFormat:(NXString *)format arguments:(va_list)args;
119 
123 - (size_t)length;
124 
129 - (const char *)cStr;
130 
134 - (size_t)runeCount;
135 
140 - (BOOL)isEqual:(id)anObject;
141 
145 - (uintptr_t)hash;
146 
151 - (NXComparisonResult)compare:(NXString *)other;
152 
157 - (BOOL)hasPrefix:(NXString *)prefix;
158 
163 - (BOOL)hasSuffix:(NXString *)suffix;
164 
168 - (BOOL)containsString:(NXString *)other;
169 
174 - (size_t)indexOfSubstring:(NXString *)other;
175 
184 - (NXArray *)componentsSeparatedByString:(NXString *)separator;
185 
194 
198 - (NXString *)description;
199 
200 @end
id string()
Returns an empty string.
NXArray * componentsSeparatedByWhitespace()
Returns the words of the string, which are between runs of whitespace, as new strings.
NXString * description()
Returns the string itself.
size_t length()
Returns the length in bytes, which doesn&#39;t include the null terminator.
NXComparisonResult
The order of two objects.
bool BOOL
A Boolean value.
Definition: runtime.h:60
A string of UTF-8 text.
Definition: NXString.h:53
An ordered list of objects, which can be changed.
Definition: NXArray.h:26
The base class for objects in the Foundation framework.
Definition: NXObject.h:28
struct objc_object * id
A pointer to an instance of a class.
Definition: runtime.h:18
uintptr_t hash()
Returns a hash of the contents, which is the same for equal strings.
const char * cStr()
Returns the contents, as a null-terminated string.
size_t runeCount()
Returns the number of runes, which are Unicode code points.