Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does @"some string" mean in objective-c?

I'm just starting out with iphone development and ran across some example code that used @"somestring"

someLabel.txt = @"string of text";

Why does the string need the '@'? I'm guessing it's some kind of shortcut for creating an object?

like image 795
timdisney Avatar asked Jun 06 '09 23:06

timdisney


1 Answers

It creates an NSString object with that string as opposed to the standard c char* that would be created without the '@'

like image 146
cobbal Avatar answered Sep 28 '22 05:09

cobbal