129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
[self freeMemory: unicodeString];
[self freeMemory: s->cString];
s->cString = newCString;
s->cStringLength = newCStringLength;
/*
* Even though cStringLength can change, length can not, therefore no
* need to change it.
*/
}
- (void)setToCString: (const char*)newCString
{
size_t newCStringLength = strlen(newCString);
|
|
|
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
[self freeMemory: unicodeString];
[self freeMemory: s->cString];
s->cString = newCString;
s->cStringLength = newCStringLength;
/*
* Even though cStringLength can change, length cannot, therefore no
* need to change it.
*/
}
- (void)setToCString: (const char*)newCString
{
size_t newCStringLength = strlen(newCString);
|