tell me as early as possible thanks
+1
A:
Why are you using CFMutableStrings and CFStrings instead of NSSString?
To answer your question:
CFMutableStringRef mutableString = CFStringCreateMutable(NULL, 0);
if (mutableString) {
CFStringAppend(mutableString, CFSTR("the first part of my string"));
CFStringAppend(mutableString, myString);
}
Here is the Apple doc entry:
CFStringAppend
Appends the characters of a string to those of a CFMutableString object.
void CFStringAppend (
CFMutableStringRef theString,
CFStringRef appendedString
);
Parameters
theString
The string to which appendedString is appended. If theString is not a CFMutableString object, an assertion is raised.
appendedString
The string to append.
Discussion
This function reallocates the backing store of theString to accommodate the new length.
Availability
Available in iPhone OS 2.0 and later.
Declared In
CFString.h
mahboudz
2009-09-10 05:40:18