mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
feat: add uppercase to integer fmt
for hex integer
This commit is contained in:
@@ -57,6 +57,7 @@ std::string to_string(const integer_format);
|
|||||||
struct integer_format_info
|
struct integer_format_info
|
||||||
{
|
{
|
||||||
integer_format fmt = integer_format::dec;
|
integer_format fmt = integer_format::dec;
|
||||||
|
bool uppercase = true; // hex with uppercase
|
||||||
std::size_t width = 0; // minimal width (may exceed)
|
std::size_t width = 0; // minimal width (may exceed)
|
||||||
std::size_t spacer = 0; // position of `_` (if 0, no spacer)
|
std::size_t spacer = 0; // position of `_` (if 0, no spacer)
|
||||||
std::string suffix = ""; // _suffix (library extension)
|
std::string suffix = ""; // _suffix (library extension)
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ TOML11_INLINE std::string to_string(const integer_format c)
|
|||||||
TOML11_INLINE bool operator==(const integer_format_info& lhs, const integer_format_info& rhs) noexcept
|
TOML11_INLINE bool operator==(const integer_format_info& lhs, const integer_format_info& rhs) noexcept
|
||||||
{
|
{
|
||||||
return lhs.fmt == rhs.fmt &&
|
return lhs.fmt == rhs.fmt &&
|
||||||
|
lhs.uppercase == rhs.uppercase &&
|
||||||
lhs.width == rhs.width &&
|
lhs.width == rhs.width &&
|
||||||
lhs.spacer == rhs.spacer &&
|
lhs.spacer == rhs.spacer &&
|
||||||
lhs.suffix == rhs.suffix ;
|
lhs.suffix == rhs.suffix ;
|
||||||
|
|||||||
Reference in New Issue
Block a user