4 ms·
NSString *myString = @"This is a" @" string."; Adjacent string constants are concatenated by the preprocessor. Otherwise, I don't think it's too much hassle to
by naz 15y ago
NSString *myString = @"This is a" @" string.";
Adjacent string constants are concatenated by the preprocessor. Otherwise, I don't think it's too much hassle to call stringByAppendingString:.
- veidr 15y agoTrue, but adjacent string constants is a totally insane use case that essentially doesn't ever happen. I think the poster was talking about the far more common case of concatenating string variables: NSString *foo = @"Hello, " + userName + @"! (^_^)";