f50cfea4 eec1 6401 2fa2 20589393a284 - akesseler/Plexdata.Utilities.Templates GitHub Wiki
Adds value padding if necessary.
Namespace: Plexdata.Utilities.Formatting.Helpers
Assembly: Plexdata.Utilities.Templates (in Plexdata.Utilities.Templates.dll) Version: 1.0.0
C#
private static void AddPadding(
this BaseToken token,
bool enabled,
StringBuilder output,
string value
)
- token
- Type: Plexdata.Utilities.Formatting.Entities.BaseToken
The token to be processed. - enabled
- Type: System.Boolean
True if padding is enabled and false if not. - output
- Type: System.Text.StringBuilder
The output where to put the padding. - value
- Type: System.String
The value to be processed.
In Visual Basic and C#, you can call this method as an instance method on any object of type BaseToken. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
This method adds left or right padding to the value but only if padding becomes enabled. Please note, the padding instruction is part of the formatting instruction. Furthermore, no padding is added if the value length exceeds the total padding length.
TemplateWeaver Class
Plexdata.Utilities.Formatting.Helpers Namespace