xtd 1.0.0
Loading...
Searching...
No Matches
println.hpp
Go to the documentation of this file.
1
4#pragma once
5#define __XTD_CORE_INTERNAL__
7#undef __XTD_CORE_INTERNAL__
8#include "string.hpp"
9
11namespace xtd {
14 inline auto println(FILE* file) -> void {
15 __xtd_print_with_file_write__(true, file, "");
16 }
17
22 template<typename arg_t>
23 auto println(FILE* file, arg_t&& value) -> void {
24 __xtd_print_with_file_write__(true, file, string::format("{}", value));
25 }
26
28 template<typename type_t>
29 auto println(FILE* file, const std::initializer_list<type_t>& il) -> void {
30 __xtd_print_with_file_write__(true, file, string::format("{}", il));
31 }
33
39 template<typename ...args_t>
40 auto println(FILE* file, const xtd::string& fmt, args_t&& ... values) -> void {
41 __xtd_print_with_file_write__(true, file, string::format(fmt, std::forward<args_t>(values)...));
42 }
43
48 template<typename ...args_t>
49 auto println(FILE* file, const char* fmt, args_t&& ... values) -> void {
50 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
51 }
52
57 template<typename ...args_t>
58 auto println(FILE* file, const char8_t* fmt, args_t&& ... values) -> void {
59 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
60 }
61
66 template<typename ...args_t>
67 auto println(FILE* file, const char16_t* fmt, args_t&& ... values) -> void {
68 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
69 }
70
75 template<typename ...args_t>
76 auto println(FILE* file, const char32_t* fmt, args_t&& ... values) -> void {
77 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
78 }
79
84 template<typename ...args_t>
85 auto println(FILE* file, const wchar_t* fmt, args_t&& ... values) -> void {
86 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
87 }
88
91 inline auto println(std::ostream& os) -> void {
92 __xtd_print_with_ostream_write__(true, os, "");
93 }
94
99 template<typename arg_t>
100 auto println(std::ostream& os, arg_t&& value) -> void {
101 __xtd_print_with_ostream_write__(true, os, string::format("{}", value));
102 }
103
105 template<typename type_t>
106 auto println(std::ostream& os, const std::initializer_list<type_t>& il) -> void {
107 __xtd_print_with_ostream_write__(true, os, string::format("{}", il));
108 }
110
116 template<typename ...args_t>
117 auto println(std::ostream& os, const xtd::string& fmt, args_t&& ... values) -> void {
118 __xtd_print_with_ostream_write__(true, os, string::format(fmt, std::forward<args_t>(values)...));
119 }
120
125 template<typename ...args_t>
126 auto println(std::ostream& os, const char* fmt, args_t&& ... values) -> void {
127 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
128 }
129
134 template<typename ...args_t>
135 auto println(std::ostream& os, const char8_t* fmt, args_t&& ... values) -> void {
136 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
137 }
138
143 template<typename ...args_t>
144 auto println(std::ostream& os, const char16_t* fmt, args_t&& ... values) -> void {
145 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
146 }
147
152 template<typename ...args_t>
153 auto println(std::ostream& os, const char32_t* fmt, args_t&& ... values) -> void {
154 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
155 }
156
161 template<typename ...args_t>
162 auto println(std::ostream& os, const wchar_t* fmt, args_t&& ... values) -> void {
163 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
164 }
165
167 inline auto println() -> void {xtd::println(stdout);}
168
172 template<typename arg_t>
173 auto println(arg_t&& value) -> void {xtd::println(stdout, value);}
174
176 template<typename type_t>
177 auto println(const std::initializer_list<type_t>& il) -> void {xtd::println(stdout, il);}
179
184 template<typename ...args_t>
185 auto println(const xtd::string& fmt, args_t&& ... values) -> void {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
190 template<typename ...args_t>
191 auto println(const char* fmt, args_t&& ... values) -> void {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
196 template<typename ...args_t>
197 auto println(const char8_t* fmt, args_t&& ... values) -> void {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
202 template<typename ...args_t>
203 auto println(const char16_t* fmt, args_t&& ... values) -> void {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
208 template<typename ...args_t>
209 auto println(const char32_t* fmt, args_t&& ... values) -> void {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
214 template<typename ...args_t>
215 auto println(const wchar_t* fmt, args_t&& ... values) -> void {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
216}
static auto format(const basic_string< char > &fmt, args_t &&... args) -> basic_string
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
auto println(FILE *file) -> void
Writes the current line terminator to the file output stream using the specified format information.
Definition println.hpp:14
Contains xtd::string alias.