folly::sformat

sformat overloads

Synopses

Declared in <folly/Format.h>

Formats fmt with arg and returns the result as a string.

std::string
sformat(
    StringPiece fmt,
    A&&... arg);
» more...

Like format(), but immediately returns the formatted string instead of an intermediate format object.

template<class... Args>
std::string
sformat(
    StringPiece fmt,
    Args&&... args);
» more...

Return Value

  • The formatted output as a string.
  • The formatted output as a std::string.

Parameters

NameDescription
fmtThe format string.
argThe values to substitute into the format string.
argsThe values to substitute into the format string.