src/Text/TextWriter.php
public function printf(string $format, ...$args): \Generator
    {
        $formatted = sprintf($format, ...$args);
        return yield from $this->write($formatted);
    }
public function printf(string $format, ...$args): \Generator
    {
        $formatted = sprintf($format, ...$args);
        return yield from $this->write($formatted);
    }
@coroutine

Writes a formatted string to the stream.

Accepts a format string followed by a series of mixed values. The string
will be formatted in accordance with the specification of the built-in
function `printf()`.

@param string $format The format string.

@return \Generator

@resolve int Number of bytes written to the buffer.

@throws \Icicle\Awaitable\Exception\TimeoutException If the operation times out.
@throws \Icicle\Stream\Exception\UnwritableException If the stream is no longer writable.
@throws \Icicle\Stream\Exception\ClosedException If the stream is unexpectedly closed.

@see http://php.net/printf