# StringFormatSpecifier class
{: .no_toc }

Describes one format item of a format string: its index, alignment, identifier and the text that follows the identifier.

[**StringHelper**](/tB/Packages/Contributed/Fmt/StringHelper.md) creates one **StringFormatSpecifier** for every format item it finds in a format string, and passes it to the [format identifier classes](/tB/Packages/Contributed/Fmt/IStringFormatIdentifier.md), which read the identifier and the precision from it. For the item `{2,-8:G3}` the index is `2`, the alignment is `-8`, the identifier is `G` and the custom specifier is `3`, which is also the precision.

A project can create an instance with `New StringFormatSpecifier` to call a format identifier class directly. The properties are plain stored values, with one exception: assigning [**CustomSpecifier**](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/CustomSpecifier.md) can set [**Precision**](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/Precision.md).

```tb check_build check_run
Dim spec As New StringFormatSpecifier
spec.Index = 2
spec.Alignment = -8
spec.identifier = "G"
spec.CustomSpecifier = "3"

Debug.Print spec.ToString()  ' {2,-8:G3}
Debug.Print spec.Precision   ' 3
```

## Properties

- [Alignment](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/Alignment.md) -- returns or sets the width and justification of the formatted value
- [CustomSpecifier](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/CustomSpecifier.md) -- returns or sets the text that follows the identifier
- [identifier](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/identifier.md) -- returns or sets the letter that selects the format
- [Index](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/IndexProperty.md) -- returns or sets the position of the value in the argument list
- [Precision](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/Precision.md) -- returns the number that the custom specifier gave

## Methods

- [ToString](/tB/Packages/Contributed/Fmt/StringFormatSpecifier/ToString.md) -- returns the text of the format item that the properties describe

## See Also

- [StringHelper](/tB/Packages/Contributed/Fmt/StringHelper.md) class -- creates the specifiers
- [IStringFormatIdentifier](/tB/Packages/Contributed/Fmt/IStringFormatIdentifier.md) interface -- receives a specifier
- [Fmt package](/tB/Packages/Contributed/Fmt/index.md) -- overview, with the syntax of a format item
