VSS.Strings.Templates

Entities

Tagged Types

Subprograms

Description

This package provides string template processor to substitute placeholders by the text generated by given set of formatters.

String template placeholder has following format: {[<parameter>][,<alignment>][:<format>]}

<parameter> is index of the parameter, when omitted next positional parameter is used.

<alignment> specify width of the text in grapheme clusters and alignment: [<^>][0-9]*

< - left alignment ^ - center alignment > - right alignment [0-9]* - number of grapheme clusters to reserve for field

Default alignment depends from the formatter. If string returned by the formatter is longer than reserved width it is put into output without truncation.

<format> format of the data to be passed to formatter. It is processed by the formatters, see documentation for particular formatter.

Format

function Format
  (Self      : Virtual_String_Template;
   Parameter : VSS.Strings.Formatters.Abstract_Formatter'Class)
   return VSS.Strings.Virtual_String
Parameters
Self
Parameter
Return Value

Format

function Format
  (Self        : Virtual_String_Template;
   Parameter_1 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_2 : VSS.Strings.Formatters.Abstract_Formatter'Class)
   return VSS.Strings.Virtual_String
Parameters
Self
Parameter_1
Parameter_2
Return Value

Format

function Format
  (Self        : Virtual_String_Template;
   Parameter_1 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_2 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_3 : VSS.Strings.Formatters.Abstract_Formatter'Class)
   return VSS.Strings.Virtual_String
Parameters
Self
Parameter_1
Parameter_2
Parameter_3
Return Value

Format

function Format
  (Self        : Virtual_String_Template;
   Parameter_1 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_2 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_3 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_4 : VSS.Strings.Formatters.Abstract_Formatter'Class)
   return VSS.Strings.Virtual_String
Parameters
Self
Parameter_1
Parameter_2
Parameter_3
Parameter_4
Return Value

Format

function Format
  (Self        : Virtual_String_Template;
   Parameter_1 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_2 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_3 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_4 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_5 : VSS.Strings.Formatters.Abstract_Formatter'Class)
   return VSS.Strings.Virtual_String
Parameters
Self
Parameter_1
Parameter_2
Parameter_3
Parameter_4
Parameter_5
Return Value

Format

function Format
  (Self        : Virtual_String_Template;
   Parameter_1 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_2 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_3 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_4 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_5 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_6 : VSS.Strings.Formatters.Abstract_Formatter'Class)
   return VSS.Strings.Virtual_String
Parameters
Self
Parameter_1
Parameter_2
Parameter_3
Parameter_4
Parameter_5
Parameter_6
Return Value

Format

function Format
  (Self        : Virtual_String_Template;
   Parameter_1 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_2 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_3 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_4 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_5 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_6 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_7 : VSS.Strings.Formatters.Abstract_Formatter'Class)
   return VSS.Strings.Virtual_String
Parameters
Self
Parameter_1
Parameter_2
Parameter_3
Parameter_4
Parameter_5
Parameter_6
Parameter_7
Return Value

Format

function Format
  (Self        : Virtual_String_Template;
   Parameter_1 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_2 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_3 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_4 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_5 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_6 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_7 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_8 : VSS.Strings.Formatters.Abstract_Formatter'Class)
   return VSS.Strings.Virtual_String
Parameters
Self
Parameter_1
Parameter_2
Parameter_3
Parameter_4
Parameter_5
Parameter_6
Parameter_7
Parameter_8
Return Value

Format

function Format
  (Self        : Virtual_String_Template;
   Parameter_1 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_2 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_3 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_4 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_5 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_6 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_7 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_8 : VSS.Strings.Formatters.Abstract_Formatter'Class;
   Parameter_9 : VSS.Strings.Formatters.Abstract_Formatter'Class)
   return VSS.Strings.Virtual_String
Parameters
Self
Parameter_1
Parameter_2
Parameter_3
Parameter_4
Parameter_5
Parameter_6
Parameter_7
Parameter_8
Parameter_9
Return Value

To_Virtual_String_Template

function To_Virtual_String_Template
  (Item : Wide_Wide_String) return Virtual_String_Template
Parameters
Item
Return Value

Virtual_String_Template

type Virtual_String_Template is tagged private
  with String_Literal => To_Virtual_String_Template;