I know some ways to build strings in objective-c, but I'm curious if I can achieve following.
Currently I'm using this:
return [NSString stringWithFormat:sentence, str, units, remainingStr, unitsRemaining];
Where sentence is a NSString that looks like this:
@"You've completed %@ %@. You have %@ %@ to go."
My question is can I somehow directly tell to the parameters: str, units, remainingStr, unitsRemaining which placeholder to take, or my only option is the direct order?
For example I want str go take third placeholder from the left, and remainingStr take the first one.
Any kind of help is highly appreciated!