0

really basic question, I have a string to generate as SQL statement that I need to run through a loop to add all the relevant criteria. How do I concatenate the statement.

Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236
  • possible duplicate of [How do I concatenate strings in Objective-C?](http://stackoverflow.com/questions/510269/how-do-i-concatenate-strings-in-objective-c) – Georg Fritzsche May 11 '10 at 13:58
  • Do you need to do this using NSString or would a straight sprintf work? – sbooth May 11 '10 at 14:01

1 Answers1

0

Take a look at this post:

Shortcuts in Objective-C to concatenate NSStrings

Community
  • 1
  • 1
Smur
  • 3,075
  • 7
  • 28
  • 46
  • Lots of dodgy answers in that one, although the accepted answer is ok. Summary is to pick between stringWithFormat: and stringByAppendingString: – Paul Lynch May 11 '10 at 13:52
  • If you want to point out duplicates, use comments not answers - especially if you are adding no content on your own. – Georg Fritzsche May 11 '10 at 13:56