How to append the string variables using stringWithFormat method in Objective-C

Posted by Madan Mohan on Stack Overflow See other posts from Stack Overflow or by Madan Mohan
Published on 2010-06-16T12:38:59Z Indexed on 2010/06/16 12:42 UTC
Read the original article Hit count: 393

Hi Guys,

I want to append the string into single varilable using stringWithFormat.I knew it in using stringByAppendingString. Please help me to append using stringWithFormat for the below code.

NSString* curl = @"https://invoices?ticket=";
curl = [curl stringByAppendingString:self.ticket];
curl = [curl stringByAppendingString:@"&apikey=bfc9c6ddeea9d75345cd"];
curl = [curl stringByReplacingOccurrencesOfString:@"\n" withString:@""];

Thank You, Madan Mohan.

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about append