I have the following string 

22\nShaʻban\n1435

and i'm using `NSMutableAttributedString` to format the above string using multiple fonts as follows:

```
NSString* orgString=@"22\nShaʻban\n1435";
NSMutableAttributedString *attString=[[NSMutableAttributedString alloc] initWithString:[dateStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]];
UIFont *dayFont=[UIFont fontWithName:@"Helvetica-Bold" size:40.0f];
UIFont *monthFont=[UIFont fontWithName:@"Arial" size:22.0f];
UIFont *yearFont=[UIFont fontWithName:@"Arial" size:20.0f];

//format day part
[attString addAttribute:NSFontAttributeName value:dayFont range:NSMakeRange(0,2)];
//format month part
[attString addAttribute:NSFontAttributeName value:monthFont range:NSMakeRange(3,[self indexOf:[dateStr substringFromIndex:3] andSearchChar:@"\n"])];
//format year part, app crashes here
[attString addAttribute:NSFontAttributeName value:yearFont range:NSMakeRange([self indexOf:[dateStr substringFromIndex:3] andSearchChar:@"\n"]+1,[dateStr length])];

- (int) indexOf:(NSString*)orgStr andSearchChar:(NSString *)charToSearc  {
NSRange range = [orgStr rangeOfString:charToSearc];
if ( range.length > 0 ) {
    return range.location;
} else {
    return -1;
  }
}

```

i don't know why it crashes when trying to format the last part, i made arrange from the last position in part two +1 to the length of the string, any help please