Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Dec 16, 2024
1 parent 15602bb commit bc8d819
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
24 changes: 21 additions & 3 deletions src/xtd.core/include/xtd/print.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,40 @@ namespace xtd {

/// @brief Writes the text representation of the specified list of values to the standard output stream using the specified format information.
/// @tparam ...args_t Types of the values to write.
/// @param fmt A composite format string.
/// @param values Values to write,
template<typename ... args_t>
void print(const xtd::string& fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(fmt, std::forward<args_t>(values)...));}

/// @cond
/// @brief Writes the text representation of the specified list of values to the standard output stream using the specified format information.
/// @tparam ...args_t Types of the values to write.
/// @param fmt A composite format string.
/// @param values Values to write,
template<typename ... args_t>
void print(const char* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
#if defined(__xtd__cpp_lib_char8_t)
/// @brief Writes the text representation of the specified list of values to the standard output stream using the specified format information.
/// @tparam ...args_t Types of the values to write.
/// @param fmt A composite format string.
/// @param values Values to write,
template<typename ... args_t>
void print(const char8_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
#endif
/// @brief Writes the text representation of the specified list of values to the standard output stream using the specified format information.
/// @tparam ...args_t Types of the values to write.
/// @param fmt A composite format string.
/// @param values Values to write,
template<typename ... args_t>
void print(const char16_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
/// @brief Writes the text representation of the specified list of values to the standard output stream using the specified format information.
/// @tparam ...args_t Types of the values to write.
/// @param fmt A composite format string.
/// @param values Values to write,
template<typename ... args_t>
void print(const char32_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
/// @brief Writes the text representation of the specified list of values to the standard output stream using the specified format information.
/// @tparam ...args_t Types of the values to write.
/// @param fmt A composite format string.
/// @param values Values to write,
template<typename ... args_t>
void print(const wchar_t* fmt, args_t&& ... values) {xtd::console::write(xtd::string::format(xtd::string {fmt}, std::forward<args_t>(values)...));}
/// @endcond
}
1 change: 0 additions & 1 deletion src/xtd.core/include/xtd/println.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ 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)...));}

/// @brief Writes the text representation of the specified list of values, followed by the current line terminator, to the standard output stream using the specified format information.
/// @tparam ...args_t Types of the values to write.
/// @param fmt A composite format string.
Expand Down

0 comments on commit bc8d819

Please sign in to comment.