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



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!