bsl::format

format overloads

Synopses

Declared in <bslfmt_format.h>

Format args according to fmtStr and return a bsl::string.

template<class... t_ARGS>
bsl::string
format(
    format_string<t_ARGS...> fmtStr,
    t_ARGS&&... args);
» more...

Format args according to fmtStr and return a bsl::wstring.

template<class... t_ARGS>
bsl::wstring
format(
    wformat_string<t_ARGS...> fmtStr,
    t_ARGS&&... args);
» more...

Format args according to fmtStr using allocator alloc.

template<class... t_ARGS>
bsl::string
format(
    allocator<char> alloc,
    format_string<t_ARGS...> fmtStr,
    t_ARGS&&... args);
» more...

Format args according to fmtStr using allocator alloc.

template<class... t_ARGS>
bsl::wstring
format(
    allocator<wchar_t> alloc,
    wformat_string<t_ARGS...> fmtStr,
    t_ARGS&&... args);
» more...

Format args according to fmtStr using locale loc.

template<class... t_ARGS>
bsl::string
format(
    std::locale const& loc,
    format_string<t_ARGS...> fmtStr,
    t_ARGS&&... args);
» more...

Format args according to fmtStr using locale loc.

template<class... t_ARGS>
bsl::wstring
format(
    std::locale const& loc,
    wformat_string<t_ARGS...> fmtStr,
    t_ARGS&&... args);
» more...

Format args according to fmtStr using alloc and locale loc.

template<class... t_ARGS>
bsl::string
format(
    allocator<char> alloc,
    std::locale const& loc,
    format_string<t_ARGS...> fmtStr,
    t_ARGS&&... args);
» more...

Format args according to fmtStr using alloc and locale loc.

template<class... t_ARGS>
bsl::wstring
format(
    allocator<wchar_t> alloc,
    std::locale const& loc,
    wformat_string<t_ARGS...> fmtStr,
    t_ARGS&&... args);
» more...

Return Value

  • the formatted string
  • the formatted wide string

Parameters

NameDescription
fmtStrformat string
argsvalues to format
allocallocator used to supply memory
loclocale used for locale-dependent formatting