Function pad

  • Pad a string to the given size.

    Parameters

    Returns string

    The padded string.

  • Pad a string to the given size.

    Parameters

    • string: string

      The string to pad.

    • width: number

      The desired width of the string.

    • side: PAD_SIDE
    • Optional padder: string

      The string to use as a padder.

    • Optional sizer: Sizer

      A custom function for determining the size of the provided string.

    • Optional color: StringTransformer

      A custom function for adding unrendered color codes to the padding.

    Returns string