absl::Substitute

Substitutes variables into format and returns the result.

Synopsis

Declared in <absl/strings/substitute.h>

[[nodiscard]]
std::string
Substitute(std::string_view format);

Return Value

The formatted string.

NOTE

The return value should not be discarded.

Parameters

NameDescription
formatThe format string with $0-$9 placeholders.