Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > Text > padEnd

Text.padEnd() method

Append characters to the end of a string to ensure the result has a minimum length.

Signature:

static padEnd(s: string, minimumLength: number, paddingCharacter?: string): string;

Parameters

ParameterTypeDescription
sstring
minimumLengthnumber
paddingCharacterstring(Optional)

Returns:

string

Remarks

If the string length already exceeds the minimum length, then the string is unchanged. The string is not truncated.