home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST8.PRG < prev    next >
Encoding:
Text File  |  1989-08-08  |  668 b   |  34 lines

  1. ********************
  2.  
  3. FUNCTION Expand
  4.  
  5.    PARAMETER _in_string, _number, _character
  6.  
  7.    * Take the string given and expand it out by placing a blank number
  8.    * of spaces between each and every character.
  9.  
  10.    IF PCOUNT() = 1
  11.       _number = 1
  12.       _character = " "
  13.    ELSEIF PCOUNT() = 2
  14.       _character = " "
  15.    ENDIF
  16.  
  17.    IF TYPE("_in_string")+TYPE("_number")+TYPE("_character") != "CNC"
  18.       RETURN("")
  19.    ENDIF
  20.  
  21.    PRIVATE _outstr, _qaz
  22.  
  23.    _outstr = ""
  24.  
  25.    FOR _qaz = 1 TO LEN(_in_string)
  26.       _outstr = _outstr + SUBSTR(_in_string, _qaz, 1) + REPLICATE(_character, _number)
  27.    NEXT
  28.  
  29.    RETURN(TRIM(_outstr))
  30.  
  31. * End of File
  32.  
  33.  
  34.