home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 13
/
CD_ASCQ_13_0494.iso
/
maj
/
419
/
strsqu2.bas
< prev
next >
Wrap
BASIC Source File
|
1994-03-13
|
2KB
|
44 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1994 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
SUB StrSqu2 (St$, Result$)
s$ = St$
x$ = " e tth as heint erd re s oorann i, r outeonro wy too leisndat"
x$ = x$ + "es c--edarentise fngitf st bme. mveofalhanent ras draria dell p"
x$ = x$ + "coetl hig ilutlaeabeusmapeam ewi llo n htromowh elchpr: ecaysiio"
x$ = x$ + "uryo yaclica :foeefidiThrsic umono S..sskeu ot Icegerrtactly== T"
code% = 128
DO
a$ = LEFT$(x$, 2)
DO
i% = INSTR(s$, a$)
IF i% THEN s$ = LEFT$(s$, i% - 1) + CHR$(code%) + MID$(s$, i% + 2)
LOOP WHILE i%
x$ = MID$(x$, 3)
code% = code% + 1
LOOP WHILE LEN(x$)
IF LEN(Result$) THEN MID$(Result$, 1) = s$
END SUB
SUB StrSquLen2 (St$, ResultLen%)
s$ = St$
x$ = " e tth as heint erd re s oorann i, r outeonro wy too leisndat"
x$ = x$ + "es c--edarentise fngitf st bme. mveofalhanent ras draria dell p"
x$ = x$ + "coetl hig ilutlaeabeusmapeam ewi llo n htromowh elchpr: ecaysiio"
x$ = x$ + "uryo yaclica :foeefidiThrsic umono S..sskeu ot Icegerrtactly== T"
code% = 128
DO
a$ = LEFT$(x$, 2)
DO
i% = INSTR(s$, a$)
IF i% THEN s$ = LEFT$(s$, i% - 1) + CHR$(code%) + MID$(s$, i% + 2)
LOOP WHILE i%
x$ = MID$(x$, 3)
code% = code% + 1
LOOP WHILE LEN(x$)
ResultLen% = LEN(s$)
END SUB