Somewhat surprisingly, it's printf()
, which behaves like sprintf()
in most other languages.
I wasn't 100% sure what the name was from the top of my head; I found this by just entering :help printf
:-) I also find :help function-list
to be invaluable when VimScript-ing.
Also see: How do I navigate to topics in Vim's documentation?.