SP_CRUNCH

CRUNCH()

  Short:
  ------
  CRUNCH() Moves spaces in a string to end of string

  Returns:
  --------
  <cCrunched> string with spaces moved to end

  Syntax:
  -------
  CRUNCH(cOriginal,nAllor1)

  Description:
  ------------
  Moves spaces to end of string <cOriginal>. If
  <nAllor1> = 1, moves all but single spaces to right end of the
  string. If <nAllor1> = 0 moves all spaces to the right end.

  Examples:
  ---------

  cString := "SUPER    Library version 2.50"

  cString := CRUNCH(cString,1) // "SUPER Library version 2.50  "

  cString := CRUNCH(cString,0) // "SUPERLibraryversion2.50     "

  Notes:
  -------
  Handy for names (i.e. FIRST and LAST)

  Source:
  -------
  S_CRUNCH.PRG

 

2 responses to “SP_CRUNCH

  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.