Table of Contents

Class TextFormatData

Namespace
SunamoData.Data
Assembly
SunamoData.dll

Alternatives: FormatOfString - allow as many as is chars in every match. Can check whether on position is expected char (letter, digit, etc.) but then not allow variable length of parsed.

public class TextFormatData : List<CharFormatData>, IList<CharFormatData>, ICollection<CharFormatData>, IReadOnlyList<CharFormatData>, IReadOnlyCollection<CharFormatData>, IEnumerable<CharFormatData>, IList, ICollection, IEnumerable
Inheritance
TextFormatData
Implements
Inherited Members
Extension Methods

Constructors

TextFormatData(bool, int, params CharFormatData[])

Initializes a new instance of the TextFormatData class. Set requiredLength to -1 if text can have any length.

public TextFormatData(bool trimBefore, int requiredLength, params CharFormatData[] formatDataItems)

Parameters

trimBefore bool

Whether to trim the text before validation.

requiredLength int

The exact required length (-1 for any length).

formatDataItems CharFormatData[]

Array of character format data items.

Properties

RequiredLength

Gets or sets the exact required length. Must not be shorter or longer. If -1, text can have any length.

public int RequiredLength { get; set; }

Property Value

int

TrimBefore

Gets or sets whether to trim the text before validation.

public bool TrimBefore { get; set; }

Property Value

bool