Totally new to iOS and am starting out with Objective-C. Been trying to figure out how to correctly output this NSLog string. I want the length of the "Hello, World!" to output. I believe the result should be "Here is the length of the string:12" right?
Can someone show me the code to fix this? Currently the result i'm getting is
"Here is the length of the string:0x1.fffe332cf2cp-10
// 3 ways of using @ and NSString. Each valid.
NSString *myString = @"Hello, World!";
int len = [myString length];
len = [@"Hello, World!" length];
myString = [[NSString alloc] initWithString:@"Hello, World!"];
len = [myString length];
NSLog(@"Here is the length of the string:%a",len);