struct fmt_spec

Overview

Format specifier segment. More…

#include <lib/include/fmt_spec.h>

struct fmt_spec {
    // fields

    uint32_t kind;
    const fmt_char* str_start;
    const fmt_char* str_end;
    uint32_t parameter;
    fmt_bool left_align: 1;
    fmt_bool prepend_plus: 1;
    fmt_bool prepend_space: 1;
    fmt_bool prepend_zero: 1;
    fmt_bool thousands_grouping: 1;
    fmt_bool alternate: 1;
    struct fmt_spec::@0 flags;
    uint32_t width;
    uint32_t precision;
    uint32_t len;
    uint32_t type;
};

Detailed Documentation

Format specifier segment. It may mean a string or a %-something mask

Fields

uint32_t kind

Specifier kind belonging to fmt_spec_kind type

const fmt_char* str_start

Pointer to start position in format string

const fmt_char* str_end

Pointer to end position in format string

uint32_t parameter

Parameter number

fmt_bool left_align: 1

Left alignment, set by minus

fmt_bool prepend_plus: 1

Prepend plus, set by plus

fmt_bool prepend_space: 1

Prepend spaces, set by space

fmt_bool prepend_zero: 1

Prepend zeros, set by zero

fmt_bool thousands_grouping: 1

Thousands grouping, set by apostrophe

fmt_bool alternate: 1

Alternate form, set by hash

uint32_t width

A numeric width, or a FMT_VALUE_OUT_OF_LINE if it is provided as a separate parameter

uint32_t precision

A numeric precision, or a FMT_VALUE_OUT_OF_LINE if it is provided as a separate parameter

uint32_t len

Length specifier belonging to fmt_spec_len type

uint32_t type

Type specifier belonging to fmt_spec_type type