Best to rely on the official docs rather than on ChatGPT
You probably want to use format — all the escape sequences are explained in fprintf.
Also take a look at ~a for formatting anything, and at ~r for formatting numbers.
6 Likes