|
Melon
A C++ library designed for RadishOS.
|
Contains functions for string formatting. More...
Classes | |
| struct | IsSpecialValue |
| Default behaviour for every type T. More... | |
| struct | IsSpecialValue< Conversion::BinaryValue< T > > |
| Partial template specialization for Conversion::BinaryValue<T>. More... | |
| struct | IsSpecialValue< Conversion::OctalValue< T > > |
| Partial template specialization for Conversion::OctalValue<T>. More... | |
| struct | IsSpecialValue< Conversion::HexadecimalValue< T > > |
| Partial template specialization for Conversion::HexadecimalValue<T>. More... | |
Concepts | |
| concept | Formattable |
| Makes sure that T is supported by formatArgs(). | |
Functions | |
| template<Formattable T, typename... ARGS> | |
| constexpr void | formatArgs (String::String &out, const String::String &fmt, Typing::USize &idx, T &&arg, ARGS &&...args) |
| Format a string. | |
| constexpr void | formatArgs (String::String &out, const String::String &fmt, Typing::USize &idx) |
| Overload to allow formatString() to compile without format arguments. | |
| template<typename... ARGS> | |
| String::String | formatString (const String::String &str, ARGS &&...args) |
| Format a string. | |
Variables | |
| template<typename T> | |
| constexpr bool | IsSpecialValueV = IsSpecialValue<std::remove_cvref_t<T>>::value |
| Alias to avoid typing IsSpecialValue<T>::value. | |
Contains functions for string formatting.
|
constexpr |
Format a string.
| out | output string |
| fmt | string to format |
| idx | index in the string |
| arg | argument |
| args | arguments |
| String::String Melon::Fmt::formatString | ( | const String::String & | str, |
| ARGS &&... | args ) |
Format a string.
Expected format: "This is a parameter: {} and here is another one: {}", a, b
| str | string to format |
| args | values |