SP_CENTR

CENTR()

  Short:
  ------
  CENTR() Centers a string in x spaces

  Returns:
  --------
  <cCentered> => String centered

  Syntax:
  -------
  CENTR(cInString,[nSpaces])

  Description:
  ------------
  Centers <cInString> in [nSpaces] spaces

  [nSpaces] spaces is optional. Default is current
  string length

  Examples:
  ---------

   cString := "Superfunction "

   cString := CENTR(cString,20)     //   => "  Superfunction  "

  Notes:
  -------
  In Clipper 5.01, use PADC(), which does the same
  thing and faster. Here for compatibility.

  Source:
  -------
  S_CENTR.PRG

 

2 responses to “SP_CENTR

  1. Pingback: SP String Functions | Viva Clipper !

  2. Pingback: SP Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.