Skip to content

PadRight

Shaun Lawrence edited this page Nov 4, 2020 · 1 revision

Returns a new string of a specified length in which the end of the current string is padded with spaces or with a specified Unicode character.

PadRight(value, length, character)

Parameters

value

The value to pad.

Type object typically a string is expected but if the value is not a text then ToString is called.
Required Yes

length

The number of characters to pad by.

Type int
Required Yes

character

The character to pad by.

Type char or string (with first char taken)
Required Yes

Examples

PadRight("2", 5, "0")

Returns 50000 in this example.

Clone this wiki locally