Thats a simple way to replace string in Objective-C in console create a "sampleStringReplace.m" file and paste a code bellow
#import 

int main(int argc, const char *argv[]){
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
//Init string with a original text
NSString *string = [[NSString alloc] initWithString:@"New MacBook Pro only US$ 1.999,00"];
NSLog(@"Original string \n %@", string);
//now replace MacBook Pro string
string = [string stringByReplacingOccurrencesOfString:@"MacBook Pro" withString:@"MacBook Air"];
//log with replace string
NSLog(@"String replace \n %@", string);
[pool release];
return 0;
}
execute
gcc -framework Foundation sampleStringReplace.m -o sampleStringReplace
after
./sampleStringReplace
and output is...
-> Original string
-> New MacBook Pro only US$ 1.999,00
-> String Replace
-> New MacBook Air only US$ 1.999,00
For this hint is all up to the next Thanks