xtd 0.2.0
Loading...
Searching...
No Matches
format_string.cpp

Show how to use format xtd::format class with standard C++ strings.

#include <xtd/console>
#include <xtd/environment>
#include <xtd/string>
using namespace std::literals;
using namespace xtd;
auto main() -> int {
console::out << string::format("{}", "string") << environment::new_line;
console::out << string::format("{}", u8"string") << environment::new_line;
console::out << string::format("{}", L"string") << environment::new_line;
console::out << string::format("{}", u"string") << environment::new_line;
console::out << string::format("{}", U"string") << environment::new_line;
console::out << string::format("{}", "string"s) << environment::new_line;
console::out << string::format("{}", u8"string"s) << environment::new_line;
console::out << string::format("{}", L"string"s) << environment::new_line;
console::out << string::format("{}", u"string"s) << environment::new_line;
console::out << string::format("{}", U"string"s) << environment::new_line;
console::out << string::format("{}", "string"_s) << environment::new_line;
console::out << string::format("{}", u8"string"_s) << environment::new_line;
console::out << string::format("{}", L"string"_s) << environment::new_line;
console::out << string::format("{}", u"string"_s) << environment::new_line;
console::out << string::format("{}", U"string"_s) << environment::new_line;
console::out << string::format("{:anything}", "string") << environment::new_line;
}
// This code produces the following output :
//
// string
// string
// string
// string
// string
// string
// string
// string
// string
// string
// string
// string
// string
// string
// string
// string
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10