CentreStr Function
Returns a string with blank spaces added to the beginning and end of the string to in effect centre the string within the given length.

Unit
QESBPCSConvert

Declaration
Function CentreStr(const S: string; const Len: LongWord): string;

Description
If even amounts of blanks cannot be put on both side, the extra blank will be on the right side. Also See: CentreChStr

Parameters
the String to be centred. If Length (S) >= Len then NO padding occurs, and S is returned.
Len the Length of returned string.

Category
Extra String Handling Routines

Implementation

function CentreStr (const S: string; const Len: LongWord): string;
begin
     Result := CentreChStr (S, ' ', Len);
End;


HTML generated by Time2HELP
http://www.time2help.com