T teguh123 macrumors member Original poster Mar 22, 2011 62 0 Jun 1, 2011 #1 That work for both @"" and for nil?
robbieduncan Moderator emeritus Jul 24, 2002 25,611 893 Harrogate Jun 2, 2011 #2 Code: if (myString != nil && ![myString isEqualToString:@""]) { } Due to the fundamental rules of C this is safe to do: if the first comparison fails the second will not get executed. In all honesty, and please don't take this the wrong way, if you need to ask this it's time to step back and learn the basics properly.
Code: if (myString != nil && ![myString isEqualToString:@""]) { } Due to the fundamental rules of C this is safe to do: if the first comparison fails the second will not get executed. In all honesty, and please don't take this the wrong way, if you need to ask this it's time to step back and learn the basics properly.