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
23 template<typename ... args_t>
24 void print(const xtd::string& fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(fmt, std::forward<args_t>(values)...));}
25
27 template<typename ... args_t>
28 void print(const char* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
29#if defined(__xtd__cpp_lib_char8_t)
30 template<typename ... args_t>
31 void print(const char8_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
32#endif
33 template<typename ... args_t>
34 void print(const char16_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
35 template<typename ... args_t>
36 void print(const char32_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
37 template<typename ... args_t>
38 void print(const wchar_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
40}
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
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
Contains xtd::console class.