Comment on What is this format specifier?

AlmightySnoo@lemmy.world ⁨1⁩ ⁨year⁩ ago

If you want multi-line code, you need to put it like this:

Image

For these kinds of questions, your best buddy is the documentation. In particular, a man ‘printf(3)’ yields:

Format of the format string

The format string is a character string, beginning and ending in its initial shift state, if any. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the character %, and ends with a conversion specifier. In between there may be (in this order) zero or more flags, an optional minimum field width, an optional precision and an optional length modifier.

The overall syntax of a conversion specification is:

%[$][flags][width][.precision][length modifier]conversion

source
Sort:hotnewtop