Shows how to use xtd::ustring::sprintf method.
#include <xtd/xtd>
enum class week_day {
};
explicit operator auto()
const noexcept {
return xtd::enum_collection<week_day> {{week_day::monday,
"monday"}, {week_day::tuesday,
"tuesday"}, {week_day::wednesday,
"wednesday"}, {week_day::thursday,
"thursday"}, {week_day::friday,
"friday"}, {week_day::saturday,
"saturday"}, {week_day::sunday,
"sunday"}};}
};
int main() {
}
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.
std::vector< std::pair< enum_t, xtd::string > > enum_collection
Represents a pair of an enum_t value and a string of an enum of type enum_t.
Definition enum_collection.hpp:24
@ tuesday
Indicates tuesday.
Definition day_of_week.hpp:31
@ saturday
Indicates saturday.
Definition day_of_week.hpp:39
@ sunday
Indicates sunday.
Definition day_of_week.hpp:27
@ monday
Indicates monday.
Definition day_of_week.hpp:29
@ wednesday
Indicates wednesday.
Definition day_of_week.hpp:33
@ thursday
Indicates thursday.
Definition day_of_week.hpp:35
@ friday
Indicates friday.
Definition day_of_week.hpp:37
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Provides the base class for enumerations.
Definition enum_object.hpp:48
xtd::string to_string() const noexcept override
Returns a xtd::string that represents the current object.
Definition enum_object.hpp:172
Provides the registration struct for enumerations.
Definition enum_register.hpp:38