SP String Functions

 SUBPLUS()      Returns multiple substrings
 STRPULL()      Extract text between 2 characters
 TAKEOUT()      Extract a portion of a string between delimiters at
                nth occurrance
 CRUNCH()       Moves spaces in a string to end of string
 ADDSPACE()     Pads right of string with spaces
 ARRANGE()      Rearranges text in a string
 CENTR()        Centers a string in x spaces
 _WILDCARD()    Wild Card String Compare
 ALLBUT()       Returns all but last x characters
 STRETCH()      Imbeds characters in a string
 LJUST()        Left justifies a string
 STARTSW()      Determines if a string starts with another string
 VAR2CHAR()     Converts any type variable to character type
 RJUST()        Right justifies a string
 PROPER()       Capitalizes first letters of string, lowers rest

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