Function Center() Foundation

Centers a string.

Syntax
Center( <cString>            , ;
        [<nLength>]          , ;  // Default: MaxCol()+1
        [<cFillCharacter>]   , ;  // Default: Chr(32)
        [<lFillLeftAndRight>]  ;  // Default: .F.
      ) --> cCenteredString
Return

Returns a string filled with <cFillCharacter> to be displayed centered.

Description

Center() fills a string with <cFillCharacter> so it is centered within a space of <nLength> characters. By default the string is only filled to the left. If <nLength> is not specified the string will be centered between the current cursor position and MaxCol()+1.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.