Lodash _.padEnd() Method
The _.padEnd() method is used to pad a string with another string until it reaches the given length. The padding is applied from the right end of the string. Padding characters are truncated if they exceed the length.
_.padEnd( [string = ''], [length = 0], [chars = ' '] )
Parameters: This method accepts three parameters as mentioned above and described below:
- string: This parameter holds the string to the pad.
- length: This parameter holds the length of the pad.
- chars: This parameter holds the string used as padding.
Return Value: This method returns the padded string.
'GFG ' '1234##'