userver: decimal64::FormatOptions Struct Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
decimal64::FormatOptions Struct Reference

Parameters for flexible decimal formatting. More...

#include <userver/decimal64/format_options.hpp>

+ Collaboration diagram for decimal64::FormatOptions:

Public Attributes

std::string decimal_point = "."
 separator of fractional and integer parts
 
std::string thousands_sep
 separator of groups in the integer part
 
std::string grouping
 
std::string negative_sign = "-"
 for negative numbers, the specified string will be inserted at beginning
 
std::string positive_sign
 for non-negative(>=0) numbers will be inserted at beginning
 
std::optional< int > precision
 
bool is_fixed = false
 if true, then the fractional part will have the maximum number of digits
 

Detailed Description

Parameters for flexible decimal formatting.

Definition at line 15 of file format_options.hpp.

Member Data Documentation

◆ decimal_point

std::string decimal64::FormatOptions::decimal_point = "."

separator of fractional and integer parts

Definition at line 17 of file format_options.hpp.

◆ grouping

std::string decimal64::FormatOptions::grouping

rule of grouping in the integer part https://en.cppreference.com/w/cpp/locale/numpunct/grouping

Definition at line 24 of file format_options.hpp.

◆ is_fixed

bool decimal64::FormatOptions::is_fixed = false

if true, then the fractional part will have the maximum number of digits

Definition at line 37 of file format_options.hpp.

◆ negative_sign

std::string decimal64::FormatOptions::negative_sign = "-"

for negative numbers, the specified string will be inserted at beginning

Definition at line 27 of file format_options.hpp.

◆ positive_sign

std::string decimal64::FormatOptions::positive_sign

for non-negative(>=0) numbers will be inserted at beginning

Definition at line 30 of file format_options.hpp.

◆ precision

std::optional<int> decimal64::FormatOptions::precision

maximum number of digits in the fractional part if nullopt, then the value is taken from the template argument

Definition at line 34 of file format_options.hpp.

◆ thousands_sep

std::string decimal64::FormatOptions::thousands_sep

separator of groups in the integer part

Definition at line 20 of file format_options.hpp.


The documentation for this struct was generated from the following file: