PadRight

Top  Previous  Next

Function

Parameters

Return value

PadRight

string s, 

int totalWidth

string

 

Left-aligns the characters in the "s" string, padding with spaces on the right for a total width specified in the "totalWidth" parameter.

 

Example:

 

PadRight("ABC", 5) = "ABC  "

 

 

Function

Parameters

Return value

PadRight

string s, 

int totalWidth,

char paddingChar

string

 

Left-aligns the characters in the "s" string, padding with "paddingChar" characters on the right for a total width specified in the "totalWidth" parameter.

 

Example:

 

PadRight("ABC", 5, '0') = "ABC00"