Format specifiers for built‐in and string types.

Synopsis

Declared in <fmt/base.h>

struct format_specs
    : basic_specs

Base Classes

Name

Description

basic_specs

Basic format specifiers for built‐in and string types.

Member Functions

Name

Description

format_specs [constructor]

Constructs a format_specs with default width and precision.

align

Returns the alignment.

alt

Returns true if the alternate form specifier ('#') is set.

clear_alt

Clears the alternate form specifier ('#').

copy_fill_from

Copies the fill string from specs.

dynamic

Returns true if the width or precision is a dynamic argument.

dynamic_precision

Returns the kind of dynamic precision argument, if any.

dynamic_width

Returns the kind of dynamic width argument, if any.

fill

Returns a pointer to the fill string.

fill_size

Returns the size of the fill string.

fill_unit

Returns the fill string packed into a single code unit.

localized

Returns true if the localized specifier ('L') is set.

set_align

Sets the alignment.

set_alt

Sets the alternate form specifier ('#').

set_dynamic_precision

Sets the kind of dynamic precision argument.

set_dynamic_width

Sets the kind of dynamic width argument.

set_fill

set_fill overloads

set_localized

Sets the localized specifier ('L').

set_sign

Sets the sign specifier.

set_type

Sets the presentation type.

set_upper

Sets the uppercase specifier.

sign

Returns the sign specifier.

type

Returns the presentation type.

upper

Returns true if the uppercase specifier is set.

Data Members

Name

Description

precision

The precision for floating‐point, string, and other types that support it, or ‐1 if not set.

width

The minimum field width.

Created with MrDocs