16 lines
700 B
Plaintext
16 lines
700 B
Plaintext
A$ = CHR$(0) + CHR$(1) + CHR$(254) + CHR$(255) : REM assignment
|
|
B$ = A$ : REM clone / copy
|
|
IF A$ = B$ THEN PRINT "Strings are equal" : REM comparison
|
|
IF A$ = "" THEN PRINT "String is empty" : REM Check if empty
|
|
A$ += CHR$(128) : REM Append a byte
|
|
S$ = MID$(A$, S%, L%) : REM Extract a substring
|
|
C$ = A$ + B$ : REM Join strings
|
|
|
|
REM To replace every occurrence of a byte:
|
|
old$ = CHR$(1)
|
|
new$ = CHR$(5)
|
|
REPEAT
|
|
I% = INSTR(A$, old$)
|
|
IF I% MID$(A$, I%, 1) = new$
|
|
UNTIL I% = 0
|