Show how to use format xtd::format class.
#include <xtd/format_exception>
#include <xtd/ustring>
using namespace std;
public:
const ustring& name()
const noexcept {
return name_;}
const ustring& rank()
const noexcept {
return rank_;}
if (fmt == "F") return name_ + " (" + rank_ + ")";
if (fmt == "N") return name_;
if (fmt == "R") return rank_;
}
private:
};
template<>
using characters = vector<character>;
auto main()->int {
cout << ustring::sprintf("%s", c.to_string()) << endl;
cout << ustring::sprintf("%s", c.to_string("F")) << endl;
cout << ustring::sprintf("%s", c.to_string("N")) << endl;
cout << ustring::sprintf("%s", c.to_string("R")) << endl;
}