I have a variety of NSStrings that could be for example:
NSString *string = [NSString stringWithFormat:@"Item Used %@ times",item.numberOfUses];
or
NSString *string = [NSString stringWithFormat:@"Created %@ items",item.count];
Main point being, the amount of characters is always different. What I need to do is calculate the number of characters, including whitespace, from the start of the string, up-to, but not including the '%@' and have that value as an integer.
I've attempted looking into NSScanner but so far am failing. Whats the correct way to do this?
cheers.