Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>get start of string to center it in an area</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Get start of string to center it in an area
------------------------------------------------------------------------------

 Syntax

       nPos := GT_Cent(<cStr>, <nLen>)

 Arguments:

     cStr := String to be centered
           nLen := Length of area to center string in

 Returns:

     Starting postion

 Description:

     To ascertain the the starting position of a string to
     enable it to be centered in a given area

 Examples:

           nPos := GT_Cent( space(20), 40 )
     nPos will equal 10

 Source: GT_CENT.PRG

 Author:  Niall Scott

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson