Identical to write function but provides ability to format message. Does not add new line.

@param string $format
@param array  ...$args
178947
protected function sprintf(string $format, ...$args)
    {
        return $this->output->write(sprintf($format, ...$args), false);
    }
115596
private function makeException(string $format, ...$arguments): InvalidArgumentException
    {
        $reason = sprintf($format, ...$arguments);
        $exception = InvalidArgumentException::make($this->value, $reason);

        return $exception;
    }
924839
public void debug(String format, Object arg) {
        if (logger.isDebugEnabled()) {
            FormattingTuple ft = MessageFormatter.format(format, arg);
            logger.log(FQCN, Level.DEBUG, ft.getMessage(), ft.getThrowable());
        }
    }
984600
public function setFormat($format)
    {
        if (!in_array($format, $this->formats)) {
            $msg = "The '%s' format is not allowed. Try with '%s'";
            throw new InvalidArgumentException(sprintf($msg, $format, implode("', '", $this->formats)));
        }

        $this->format = $format;

        return $this;
    }
410305
@Override
    public void trace(String format, Object arg) {
        if (logger.isTraceEnabled()) {
            FormattingTuple ft = MessageFormatter.format(format, arg);
            logger.trace(ft.getMessage(), ft.getThrowable());
        }
    }
1254115
public function formatLine(string $format, array $item, array $style = [])
    {
        foreach ($item as $key => $value) {
            $value = (isset($style[$key]) && ! empty($style[$key])) ?
                    "<{$style[$key]}>{$value}</>" :
                    $value;
            $format = str_replace("<{$key}>", $value, $format);
        }

        $this->output->writeln($format);
    }
554171
public static function setFormatDefinition(string $name, string $format): void
    {
        if (!self::$formats) {
            self::$formats = self::initFormats();
        }

        self::$formats[$name] = $format;
    }
93774
public function setFormat($format)
    {
        if (!in_array($format, self::$supportedFormats)) {
            throw new BuildException(
                sprintf(
                    'Invalid output format "%s", allowed are: %s',
                    $format,
                    implode(', ', self::$supportedFormats)
                )
            );
        }
        $this->format = $format;
    }
198494
function println(format, varArgs) {
  var vargs = Array.from(arguments);
  vargs[0] += '\n';
  process.stdout.write(sprintf.apply(null, vargs));
}
198986
protected function write($string, $format = true)
    {
        if ($format) {
            $string .= $this->delimiter;
        }

        $string .= "\n";

        if (fwrite($this->file, $string, strlen($string)) === false) {
            throw new Exception('Unable to write '.strlen($string).' bytes to the dumpfile.');
        }
    }
369271
protected function callFunction($prefix, $format, array $arguments)
    {
        $function = "$prefix$format";

        if (!in_array($format, $this->getSupportedFormats())) {
            throw new RuntimeException("Unsupported image format $format");
        }

        if (!function_exists($function)) {
            throw new BadFunctionCallException("Function $function does not exist");
        }

        return call_user_func_array($function, $arguments);
    }
58281
public function writeCommand($command, $args = [])
    {
        if (OutputInterface::VERBOSITY_VERBOSE > $this->getOutput()->getVerbosity()) {
            return;
        }

        if (count($args)) {
            $outArr = [];
            foreach ($args as $arg) {
                if (is_array($arg)) {
                    $arg = array_map(
                        function ($value) {
                            return '\'' . $value . '\'';
                        },
                        $arg
                    );
                    $outArr[] = '[' . implode(', ', $arg) . ']';
                    continue;
                }

                $outArr[] = '\'' . $arg . '\'';
            }
            $this->getOutput()->writeln(' -- ' . $command . '(' . implode(', ', $outArr) . ')');

            return;
        }

        $this->getOutput()->writeln(' -- ' . $command);
    }
1322307
public function setFormat($format)
    {
        if (!is_null($format)) {
            $this->format = $format;
            $this->useFormat(false);
        }

        return $this;
    }
419473
public function setDefaultStringFormat($format)
    {
        $formats = static::getSupportedStringFormats();

        $format = strtoupper($format);
        if (!in_array($format, $formats)) {
            throw new InvalidArgumentException(sprintf('Given "%s" default string format is not supported. Only "%s" are valid string formats.', $format, implode(', ', $formats)));
        }

        $this->defaultStringFormat = $format;
    }
468512
protected function write($pattern = null, ...$args)
    {
        if (!$this->hasOutput()) {
            return $this;
        }

        $this->getOutput()->write(vsprintf($pattern, $args));

        return $this;
    }
1102112
public function setDefaultFormat($format)
    {
        foreach (parent::all() as $route) {
            // Set default format only if not set already (could be defined in annotation)
            if (!$route->getDefault('_format')) {
                $route->setDefault('_format', $format);
            }
        }
    }
1047062
private function doWrite($messages, $newline, $stderr, $verbosity)
    {
        $sfVerbosity = $this->verbosityMap[$verbosity];
        if ($sfVerbosity > $this->output->getVerbosity()) {
            return;
        }

        $this->getOutputToWriteTo($stderr)->write($messages, $newline, $sfVerbosity);
    }