stringWithString:
Returns a string created by copying the characters from another given string.
+ (id)stringWithString:(NSString *)aString
e.g. newStr = [NSString stringWithString: oldStr];
UTF8String
Returns a null-terminated UTF8 representation of the receiver.
- (const char *)UTF8String
e.g NSLog(@"newStr: %s", [newStr UTF8String]);
沒有留言:
張貼留言