Skip to content

padRight

padRight(string, length, char?) → string · String

Pad a string on the right to the given length.

  • string (required): the string to pad

  • length (required): target length

  • char (optional): pad character (default " ")

utlx
padRight("hello", 10, ".")              // "hello....."

Released under AGPL-3.0.