home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / QBAS / PBCLON20.ZIP / PBC$BAS.ZIP / CENTERST.BAS < prev    next >
BASIC Source File  |  1992-10-14  |  679b  |  17 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |        PBClone  Copyright (c) 1990-1992  Thomas G. Hanlin III        |
  4. '   |                                                                      |
  5. '   +----------------------------------------------------------------------+
  6.  
  7. FUNCTION CenterSt$ (StToCenter$, Columns%)
  8.    t% = LEN(StToCenter$)
  9.    IF t% < Columns% THEN
  10.       St$ = SPACE$(Columns%)
  11.       MID$(St$, (Columns% - t%) \ 2 + 1) = StToCenter$
  12.       CenterSt$ = St$
  13.    ELSE
  14.       CenterSt$ = LEFT$(StToCenter$, Columns%)
  15.    END IF
  16. END FUNCTION
  17.