In OCaml, I can use Printf.printf
to output formatted string, like
Printf.printf "Hello %s %d\n" world 123
However, printf
is a kind of output.
What I wish for is not for output, but for a string. For example, I want
let s = something "Hello %s %d\n" "world" 123
then I can get s = "Hello World 123"
How can I do that?