Question: I would like to change it to first name and last initial. 

Thanks!

Answer: 
```
NSString* nameStr = @"Firstname Lastname";
NSArray* firstLastStrings = [nameStr componentsSeparatedByString:@" "];
NSString* firstName = [firstLastStrings objectAtIndex:0];
NSString* lastName = [firstLastStrings objectAtIndex:1];
char lastInitialChar = [lastName characterAtIndex:0];
NSString* newNameStr = [NSString stringWithFormat:@"%@ %c.", firstName, lastInitialChar];

```

This could be much more concise, but I wanted clarity for the OP :) Hence all the interim variables and var names.
This would do it:

```
NSArray *components = [fullname componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
NSString *firstnameAndLastnameInitial = [NSString stringWithFormat:@"%@ %@.", [components objectAtIndex:0], [[components objectAtIndex:1] substringToIndex:1]];

```

This assumes that fullname is an instance of NSString and contains two components separated by whitespace, so you will need to check for that as well.