A couple of examples:
infix fun Double.f(fmt: String) = "%$fmt".format(this)
infix fun Double.f(fmt: Float) = "%${if (fmt < 1) fmt + 1 else fmt}f".format(this)
val pi = 3.14159265358979323
println("""pi = ${pi f ".2f"}""")
println("pi = ${pi f .2f}")