FWriteFmt
Description
Write formatted output to a file stream. Formats the rendered string via the in-tree formatted-write backend and emits the result to the stream.
Parameters
| Name | Direction | Description |
|---|---|---|
stream |
in | Pointer to the File to write to. |
fmtstr |
in | Format string with {} placeholders. |
Success
Placeholders in fmtstr are replaced by the passed arguments, and the resulting formatted string is written to the specified stream.
Failure
Failure might occur during memory allocation for the temporary string or during the write operation to the stream; the backend may also log an error message.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
ArgParse.c:391:
printed_positional_header = true;
}
FWriteFmt(&err, "{}", left_col[i]);
for (u64 pad = left_w[i]; pad < max_w + 2; ++pad)
FWriteFmt(&err, " ");- In
ArgParse.c:393:
FWriteFmt(&err, "{}", left_col[i]);
for (u64 pad = left_w[i]; pad < max_w + 2; ++pad)
FWriteFmt(&err, " ");
FWriteFmtLn(&err, "{}", sp->help ? sp->help : "");
}- In
ArgParse.c:407:
printed_options_header = true;
}
FWriteFmt(&err, "{}", left_col[i]);
for (u64 pad = left_w[i]; pad < max_w + 2; ++pad)
FWriteFmt(&err, " ");- In
ArgParse.c:409:
FWriteFmt(&err, "{}", left_col[i]);
for (u64 pad = left_w[i]; pad < max_w + 2; ++pad)
FWriteFmt(&err, " ");
FWriteFmtLn(&err, "{}", sp->help ? sp->help : "");
}- In
Io.h:684:
do { \
File UNPL(out) = FileStdout(); \
FWriteFmt(&UNPL(out), __VA_ARGS__); \
} while (0)
Last updated on