FWriteFmtLn

Table of Contents

FWriteFmtLn

Description

Write formatted output to a file stream followed by a newline character. This macro internally uses StrWriteFmtInternal to format the string and then writes it to the stream followed by a newline.

Parameters

NameDirectionDescription
streaminPointer to the FILE stream to write to.
fmtstrinFormat string with {} placeholders. should be wrapped with variable.

Success

Placeholders in fmtstr are replaced by the passed arguments, and the resulting formatted string followed by a newline is written to the stream.

Failure

Failure might occur during memory allocation for the temporary string or during the write operation to the stream (fputs or fputc). Errors from StrWriteFmtInternal (logging messages) might also occur.

Usage example (Cross-references)

    /// TAGS: Macro, Convenience, Stdout, I/O
    ///
    #define WriteFmtLn(...) FWriteFmtLn(stdout, __VA_ARGS__)
    
    ///

Share :

Related Posts

StrReadFmt

StrReadFmt Description Parse input string according to format string with rust-style placeholders, extracting values into provided arguments. This is a macro wrapper around StrReadFmtInternal.

Read More

JW_FLT_KV

JW_FLT_KV Description Write a key and float value to a JSON object.

Read More

JW_BOOL

JW_BOOL Description Append a boolean value to the JSON as unquoted true/false.

Read More