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

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |        PBClone  Copyright (c) 1990-1992  Thomas G. Hanlin III        |
  4. '   |                                                                      |
  5. '   +----------------------------------------------------------------------+
  6.  
  7. SUB StrSqu3 (St$, Result$)
  8.    s$ = St$
  9.    x$ = ".      ththeinghe ed  to anng nd  a andto  of waof as "
  10.    x$ = x$ + " inwasat  beer re e ther ha hein ered t it...hatt te a"
  11.    x$ = x$ + "tha I it ly is ents ae wall co, at wen   Iut foraten t"
  12.    x$ = x$ + "ion wiyouon e steran  fo yome t a we ma hior es  nover"
  13.    x$ = x$ + "hisad s td ath thiThe wh soomeithourwittio retedst n a"
  14.    x$ = x$ + "e oe h asve s,  stll hade me,  on li don'tevese ecte c"
  15.    x$ = x$ + "note b Thoute pld ati.. , t't  mot ite oulot d b pr leuldt o"
  16.    code% = 128
  17.    DO
  18.       a$ = LEFT$(x$, 3)
  19.       DO
  20.          i% = INSTR(s$, a$)
  21.          IF i% THEN s$ = LEFT$(s$, i% - 1) + CHR$(code%) + MID$(s$, i% + 3)
  22.       LOOP WHILE i%
  23.       x$ = MID$(x$, 4)
  24.       code% = code% + 1
  25.    LOOP WHILE LEN(x$)
  26.    IF LEN(Result$) THEN MID$(Result$, 1) = s$
  27. END SUB
  28.  
  29. SUB StrSquLen3 (St$, ResultLen)
  30.    s$ = St$
  31.    x$ = ".      ththeinghe ed  to anng nd  a andto  of waof as "
  32.    x$ = x$ + " inwasat  beer re e ther ha hein ered t it...hatt te a"
  33.    x$ = x$ + "tha I it ly is ents ae wall co, at wen   Iut foraten t"
  34.    x$ = x$ + "ion wiyouon e steran  fo yome t a we ma hior es  nover"
  35.    x$ = x$ + "hisad s td ath thiThe wh soomeithourwittio retedst n a"
  36.    x$ = x$ + "e oe h asve s,  stll hade me,  on li don'tevese ecte c"
  37.    x$ = x$ + "note b Thoute pld ati.. , t't  mot ite oulot d b pr leuldt o"
  38.    code% = 128
  39.    DO
  40.       a$ = LEFT$(x$, 3)
  41.       DO
  42.          i% = INSTR(s$, a$)
  43.          IF i% THEN s$ = LEFT$(s$, i% - 1) + CHR$(code%) + MID$(s$, i% + 3)
  44.       LOOP WHILE i%
  45.       x$ = MID$(x$, 4)
  46.       code% = code% + 1
  47.    LOOP WHILE LEN(x$)
  48.    ResultLen% = LEN(s$)
  49. END SUB
  50.