The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



CenterString


Unit:SDL_stringl
Class:none
Declaration:function 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.


Last Update: 2012-Oct-20