#include <xtd/console>
#include <xtd/double_object>
#include <xtd/environment>
#include <xtd/single_object>
#include <xtd/format>
enum class cap {title, middle,
end};
template<typename number_t>
auto print_floating_point(
const string&
text, number_t value, cap
c) {
<<
"┌─────────────────────────────────────┬────────────┬──────────────────────────────────────────────────────────────────┐" <<
environment::new_line
<<
"├─────────────────────────────────────┼────────────┼──────────────────────────────────────────────────────────────────┤" <<
environment::new_line;
else
}
auto main() -> int {
std::locale::global(std::locale {"en_US.UTF-8"});
print_floating_point(".0", .0, cap::title);
print_floating_point("12.345f", 12.345f, cap::middle);
print_floating_point("3.1415e-4", 3.1415e-4, cap::middle);
}
static constexpr double NaN
Definition box_floating_point.hpp:59
static constexpr double positive_infinity
Definition box_floating_point.hpp:65
static constexpr float negative_infinity
Definition box_floating_point.hpp:62
static constexpr type_t max_value
Represents the largest possible value of type_t. This field is constant.
Definition box_integer.hpp:67
static constexpr type_t min_value
Represents the smallest possible value of type_t. This field is constant.
Definition box_integer.hpp:70
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition console.hpp:52
static xtd::string new_line() noexcept
Gets the newline string defined for this environment.
@ c
The C key.
Definition console_key.hpp:92
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
const_iterator end() const
Returns an iterator to the end.
Definition read_only_span.hpp:213