Skip to content

Commit

Permalink
overload println methods
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Nov 25, 2024
1 parent f3e21e6 commit 90bd1c4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/xtd.core/include/xtd/println.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,19 @@ namespace xtd {
/// @param values Values to write,
template<typename ... args_t>
void println(const xtd::string& fmt, args_t&& ... values) {xtd::console::write_line(xtd::string::format(fmt, std::forward<args_t>(values)...));}

/// @cond
template<typename ... args_t>
void println(const char* fmt, args_t&& ... values) {xtd::console::write_line(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
#if defined(__xtd__cpp_lib_char8_t)
template<typename ... args_t>
void println(const char8_t* fmt, args_t&& ... values) {xtd::console::write_line(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
#endif
template<typename ... args_t>
void println(const char16_t* fmt, args_t&& ... values) {xtd::console::write_line(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
template<typename ... args_t>
void println(const char32_t* fmt, args_t&& ... values) {xtd::console::write_line(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
template<typename ... args_t>
void println(const wchar_t* fmt, args_t&& ... values) {xtd::console::write_line(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
/// @endcond
}

0 comments on commit 90bd1c4

Please sign in to comment.