Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 05-07-2009, 07:29 AM   #5 (permalink)
carbcycle
New Member
 
Join Date: May 2009
Posts: 3
carbcycle is on a distinguished road
Default

Quote:
Originally Posted by _pi View Post
Sure. It's important to keep in mind, that NSLog simply takes 1 NSString object, so you either need to concatenate multiple strings together using the method "stringByAppendingString" or you can create one yourself using [NSString stringWithFormat] which allows to use placeholders (such as %d, %f, %@, and so on)

Code:
NSString *s = [NSString stringWithString:@"this is the content of the string"];	

NSLog([[NSString stringWithString:@"the string contains: "] stringByAppendingString:s]);

NSLog([NSString stringWithFormat:@"the string contains: %@", s]);

Hope this helps.
Thats great thank you.
carbcycle is offline   Reply With Quote
 

» Advertisements
» Online Users: 432
19 members and 413 guests
13dario13, 7twenty7, baja_yu, bhsu21, Bryan1, ClerurcifeDer, Duncan C, gdogdev, GraffitiCircus, guusleijsten, HowEver, iAppDeveloper, iekei, ilmman, Paul Slocum, PavelMik, QuantumDoja, stanny, yys
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,637
Threads: 94,101
Posts: 402,822
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jessicagx69
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:22 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.