Function padLeft

  • If string is less than length characters long, add however many padWith characters are necessary to make up the difference to the BEGINNING of the string.

    Parameters

    • string: string
    • length: number
    • padWith: string = ' '

    Returns string