xtd 0.2.0
Loading...
Searching...
No Matches
print.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "console.hpp"
6
8namespace xtd {
12 template<typename arg_t>
13 void print(arg_t&& value) {xtd::console::write(xtd::string::format("{}", value));}
14
16 template<typename type_t>
17 void print(std::initializer_list<type_t>&& il) {xtd::console::write(xtd::string::format("{}", il));}
19
24 template<typename ... args_t>
25 void print(const xtd::string& fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(fmt, std::forward<args_t>(values)...));}
30 template<typename ... args_t>
31 void print(const char* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
32#if defined(__xtd__cpp_lib_char8_t)
37 template<typename ... args_t>
38 void print(const char8_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
39#endif
44 template<typename ... args_t>
45 void print(const char16_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
50 template<typename ... args_t>
51 void print(const char32_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
56 template<typename ... args_t>
57 void print(const wchar_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
58}
Represents text as a sequence of character units.
Definition basic_string.hpp:79
static void write(arg_t &&value)
Writes the text representation of the specified value to the standard output stream.
Definition console.hpp:462
Contains xtd::console class.
static basic_string format(const basic_string< char > &fmt, args_t &&... args)
Writes the text representation of the specified arguments list, to string using the specified format ...
@ print
The PRINT key.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10