Rearrange logic in `StringPrototype::Format`.