picofuse-objc

NXMutableString.h
Go to the documentation of this file.
1 
5 #pragma once
6 
18 @interface NXMutableString : NXString {
19 @private
20  char *_data;
21  size_t _length;
22  size_t _capacity;
23  uintptr_t _changing;
24 }
25 
29 + (id)stringWithCapacity:(size_t)capacity;
30 
34 - (id)initWithCapacity:(size_t)capacity;
35 
40 - (id)copy;
41 
45 - (size_t)capacity;
46 
50 - (BOOL)appendString:(NXString *)other;
51 
55 - (BOOL)appendCString:(const char *)cStr;
56 
60 - (BOOL)appendFormat:(NXString *)format, ...;
61 
66 - (void)trimWhitespace;
67 
72 - (BOOL)trimPrefix:(NXString *)prefix;
73 
78 - (BOOL)trimSuffix:(NXString *)suffix;
79 
83 - (void)toUppercase;
84 
88 - (void)toLowercase;
89 
90 @end
void toUppercase()
Changes letters to uppercase, if they're in the Latin-1 character set.
id copy()
Returns a string, which can't be changed, with the same contents, or nil if there isn't enough memory...
A string which can be changed.
bool BOOL
A Boolean value.
Definition: runtime.h:60
void trimWhitespace()
Removes whitespace from the start and end: Unicode's spaces, such as tabs, line endings, no-break, em and ideographic spaces, but not zero width spaces.
A string of UTF-8 text.
Definition: NXString.h:53
void toLowercase()
Changes letters to lowercase, if they're in the Latin-1 character set.
struct objc_object * id
A pointer to an instance of a class.
Definition: runtime.h:18
size_t capacity()
Returns the length that the string can be before it needs more memory.
const char * cStr()
Returns the contents, as a null-terminated string.