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

Content added Content deleted
(Strip a set of characters from a string in BASIC256)
(Strip a set of characters from a string in Yabasic)
Line 2,596: Line 2,596:
Sh ws soul strppr. Sh took my hrt!
Sh ws soul strppr. Sh took my hrt!
</pre>
</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}}==
=={{header|zkl}}==