Примеры:
"Something %d" and "Something else %d" // Compatible
"Something %d" and "Something else %f" // Not Compatible
"Something %d" and "Something %d else %d" // Not Compatible
"Something %d and %f" and "Something %2$f and %1$d" // Compatible
Я понял, что для этого должна быть какая-то функция C, но я не получаю релевантных результатов поиска. Я имею в виду, что компилятор проверяет соответствие строки формата и аргументов, поэтому код для проверки этого уже написан. Вопрос только в том, как я могу это назвать.
Я использую Objective-C, поэтому, если есть специальное решение Objective-C, которое тоже отлично.