forum

Home / DeveloperSection / Forums / How to get First Character from each string of an Array

How to get First Character from each string of an Array

zack mathews 1323 18-Nov-2015
I have an Array of String, I would like to know how to fetch the first character of each string when the first character is different to previous strings.
For example:
NSArray *arr = @[@"AA", @"AAA", @"B", @"BBB", @"BBBB", @"CC", @"DD"];
I want these character in another array:
A,B,C,D
Please help me.


Updated on 18-Nov-2015

Can you answer this question?


Answer

1 Answers

Liked By