I have a string, I'm trying to get the first 2 characters and the rest of the string. Here is how I am trying to do this:
NSString *textAll = [arrayOfMessages objectAtIndex:indexPath.row]; NSString *textMessage = [textAll substringFromIndex:2]; NSString *textType = [textAll substringToIndex:1];
textAll has the following form: HE message itself .....
textType should return 'HE' textMessage should return "the message itself ....." Textmessage now gives me a message, but I can not get textType ...
ios
Alessandro
source share