Strip a set of characters from a string: Difference between revisions

Strip a set of characters from a string in Yabasic
(Strip a set of characters from a string in BASIC256)
(Strip a set of characters from a string in Yabasic)
Line 2,596:
Sh ws soul strppr. Sh took my hrt!
</pre>
 
=={{header|Yabasic}}==
<lang yabasic>sub stripchars$(text$, remove$)
local i, t, s$
s$ = text$
for i = 1 to len(remove$)
do
t = instr(s$, mid$(remove$, i, 1))
if t then s$ = left$(s$, t - 1) + mid$(s$, t + 1) else break : fi
loop
next i
return s$
end sub
 
print stripchars$("She was a soul stripper. She took my heart!", "aei")</lang>
 
=={{header|zkl}}==
2,130

edits