[#BloombergLP-bslfmt-PadUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslfmt.adoc[bslfmt]::PadUtil :relfileprefix: ../../ :mrdocs: This `struct` serves as a namespace for static functions related to padding output by bslfmt. == Synopsis Declared in `<bslfmt_padutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_CHAR> struct PadUtil; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslfmt/PadUtil/Alignment.adoc[`Alignment`] | Alias for the parsed alignment enumerator type. | xref:BloombergLP/bslfmt/PadUtil/Enums.adoc[`Enums`] | Alias for `FormatSpecificationParserEnums`. | xref:BloombergLP/bslfmt/PadUtil/NumericValue.adoc[`NumericValue`] | Alias for `FormatterSpecificationNumericValue`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslfmt/PadUtil/computePadding.adoc[`computePadding`] | Compute the left and right padding values needed to format content with the specified `contentWidth` within a field of the width specified by `widthValue` using the specified `alignment`. If `Enums::e_ALIGN_DEFAULT` is passed to `alignment`, use the specified `defaultAlign` instead. Load the computed padding values into the specified `leftPadding` and `rightPadding`. If the category of `widthValue` is not `e_VALUE` or if the value indicated by `widthValue` is less than `contentWidth`, the padding is zero. The behavior is undefined if `contentWidth` specifies a negative width, or if `defaultAlign` specifies `e_ALIGN_DEFAULT`. | xref:BloombergLP/bslfmt/PadUtil/pad-0d.adoc[`pad`] | `pad` overloads |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#