[Overview][Constants][Types][Procedures and functions] |
Pad the string to a certain length, so the string is centered.
Source position: strutils.pp line 144
function PadCenter( |
const S: String; |
Len: Integer |
):String; |
S |
|
String to center |
Len |
|
Desired length of the resulting string |
Centered string of the specified length
PadCenteradd spaces to the left and right of the string Still the result reaches length Len. If the number of spaces to add is odd, then the extra space will be added at the end. If the string Shas length equal to or largert than Len, no spaces are added, and the string Sis returned as-is.
None.
|
Add spaces to the left of a string till a certain length is reached. |
|
|
Add spaces to the right of a string till a certain length is reached. |
|
|
Add characters to the left of a string till a certain length |
|
|
Add chars at the end of a string till it reaches a certain length |