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);

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);

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);

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);

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);

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);

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);

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);

Return Value

  • the formatted string

  • the formatted wide string

Parameters

Name

Description

fmtStr

format string

args

values to format

alloc

allocator used to supply memory

loc

locale used for locale‐dependent formatting

Created with MrDocs