String.pad_end

String.pad_end

String.pad_end

Function

Pads content at the end of the string to the target length.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
target_lenNumberYesNoneTarget length.
padStringNoSpacePad text.

Return value

TypeDescription
StringThe new string after filling.

Code Example

Notes

  • Return the original string when the current length is greater than or equal to the target length.