Substituting+characters+in+a+string

//by Richard Russell, August 2011//

If you want to substitute one character for another in a string (for example you want to change every colon '**:**' into a dash '**-**') there's a more efficient and elegant way than looping through each character in turn: code format="bb4w" REPEAT i% = INSTR(A$,":") IF i% MID$(A$,i%,1) = "-" UNTIL i%=0 code This is particularly efficient in the typical case when not many characters need to be substituted.