Table of Contents

GetPaddedString Procedure

Codeunit Text Mgt.

Pads a string, either left or right adjusted.

Signature

GetPaddedString(StringToModify: Text; PadLength: Integer; PadCharacter: Text[1]; Justification: Enum "QWETB Text Col. Justification") : Text

Parameters

StringToModify Text

The text string that should be padded

PadLength Integer

The length to which the StringToModify should be padded to. This must be greater or equal to the length of StringToModify.

PadCharacter Text[1]

The character that should be used as a padding character. This is usually a space or a zero.

Justification Enum "QWETB Text Col. Justification"

Specifies if the text should be left or right justified in the padded string.

Returns

Text

The padded string.

Remarks

If StringToModify is longer than the provided PadLength, an error will be thrown.

This documentation is generated from Smart Toolbox v27.1