| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== CENTER (return centered string) ====== | [[callback register or unregister a filecallbackinterface.htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[chain execute another program .htm|{{btn_next_n.gif|Next page}}]] | | || **CENTER(**//string// [,//length//]**)** {{blk2blue.jpg|blk2blue.jpg}} | **CENTER** | Returns centered string. | | //string// | A string constant, variable or expression. | | //length// | The length of the return string. If omitted, the length of the //string// parameter is used. | The **CENTER** procedure first removes leading and trailing spaces from a //string//, then pads it with leading and trailing spaces to center it within the //length//, and returns a centered string. | **Return Data Type:** | STRING | **Example:** **  !CENTER('ABC',5) returns ' ABC '** **  !CENTER('ABC ')  returns ' ABC '** **  !CENTER(' ABC')  returns ' ABC '** **  Message = CENTER(Message)    !Center the message** **  Rpt:Title = CENTER(Name,60)  !Center the name** **See Also:** [[left return left justified string .htm|LEFT]] [[right return right justified string .htm|RIGHT]]