I have three string objects:
NSString *firstName;
NSString *lastName;
NSString *fullName;
Values for firstNameand lastNameare taken from NSTextFields.
Then I want to combine the two lines and put the result in fullname.
This is the code I'm using:
fullName = [firstName stringByAppendingString:lastName];
However, the result does not put a space between the two names (e.g. JohnSmith).
How to add in the sample? I would like the result to look like (John Smith).
source
share