microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
microfmt::formatter< as_string_view > Struct Reference

Formatter for as_string_view supporting fill, alignment, width, precision, and debug escaping. More...

#include <string.hpp>

Collaboration diagram for microfmt::formatter< as_string_view >:
Collaboration graph
[legend]

Public Member Functions

constexpr void parse (format_parse_context &ctx) noexcept
 Parses the advanced string specifier.
 
void format (const as_string_view &val, const sink &out) const noexcept
 Renders the string with the requested alignment/padding/escaping.
 

Public Attributes

detail::parsed_string_spec spec_ {}
 Parsed format state carried from parse to format.
 

Detailed Description

Formatter for as_string_view supporting fill, alignment, width, precision, and debug escaping.

Member Function Documentation

◆ format()

void microfmt::formatter< as_string_view >::format ( const as_string_view &  val,
const sink &  out 
) const
inlinenoexcept

Renders the string with the requested alignment/padding/escaping.

Parameters
valThe string view to format.
outDestination sink.

◆ parse()

constexpr void microfmt::formatter< as_string_view >::parse ( format_parse_context &  ctx)
inlineconstexprnoexcept

Parses the advanced string specifier.

Parameters
ctxFormat parse context exposing the specifier text.

Member Data Documentation

◆ spec_

Parsed format state carried from parse to format.


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