mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 09:08:08 +08:00
feat: set upper/lowercase while serialization
This commit is contained in:
@@ -193,7 +193,19 @@ class serializer
|
||||
{
|
||||
case integer_format::hex:
|
||||
{
|
||||
oss << std::setw(static_cast<int>(fmt.width)) << std::setfill('0') << std::hex << i;
|
||||
oss << std::noshowbase
|
||||
<< std::setw(static_cast<int>(fmt.width))
|
||||
<< std::setfill('0')
|
||||
<< std::hex;
|
||||
if(fmt.uppercase)
|
||||
{
|
||||
oss << std::uppercase;
|
||||
}
|
||||
else
|
||||
{
|
||||
oss << std::nouppercase;
|
||||
}
|
||||
oss << i;
|
||||
return std::string("0x") + insert_spacer(oss.str());
|
||||
}
|
||||
case integer_format::oct:
|
||||
|
Reference in New Issue
Block a user