Add solution and tests for stringFormat