Declaration: CenterString (Instring: string; Width: byte): string;
The function CenterString centers the string Instring within a field of length Width. The parameter Width may assume values between 1 and 255. If Width is smaller than the length of the string to be centered, the function CenterString will return the first Width characters only.

Example: The statement "hstr := CenterString ('TEST',8);" assigns the string '  TEST  ' to the variable hstr.