VSS.Strings.Formatters

Entities

Simple Types

Record Types

Interface Types

Subprograms

Description

This package provides base type for formatters, used by string templates processor. Children packages provides implementations of formatters for some types, applications can define own formatters too.

Abstract_Formatter

type Abstract_Formatter is limited interface;

Field_Alignment

type Field_Alignment is (Default, Left, Center, Right, Fill);
Enumeration Literal
Default
Left
Center
Right
Fill

Format

function Format
  (Self   : Abstract_Formatter;
   Format : Format_Information)
   return VSS.Strings.Virtual_String

Format value using given format specification.

Parameters
Self
Format
Return Value

Format_Information

type Format_Information is record
   Width     : VSS.Strings.Grapheme_Cluster_Count := 0;
   Alignment : Field_Alignment                    := Default;
   Format    : VSS.Strings.Virtual_String;
end record;
Record fields
Width
Alignment
Format

Name

function Name
  (Self : Abstract_Formatter)
   return VSS.Strings.Virtual_String

Name of the parameter.

Parameters
Self
Return Value