This is my NSLocalizedString:
"YOUR_INFO" = "%i is the first number, %i the second and %i the third";
Later on, i'm using this string like this:
NSString *detailString = [NSString stringWithFormat:NSLocalizedString(@"YOUR_INFO", nil), firstVal, secondVal, thirdVal];
I'm trying to find out the indexes of the variables in order to use NSMutableAttributedString
to highlight them in bold.
I was going to use rangeOfString
, but then I realised there could be an issue if some if two values are the same....
Is there any way to get the position in the string of those variables in any other smart way?