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

m
→‎{{header|S-BASIC}}: removed unneeded variable
(Add emacs lisp)
imported>KayproKid
m (→‎{{header|S-BASIC}}: removed unneeded variable)
Line 2,571:
rem - strip unwanted characters from a string
function strip(s, unwanted = string) = string
var i, slen = integer
var outstr = string
var ch = char
slen = len(s)
outstr = ""
for i = 1 to slenlen(s)
ch = mid(s, i, 1)
if instr(1, unwanted, ch) = 0 then
Line 2,592 ⟶ 2,591:
Sh ws soul strppr. Sh took my hrt!
</pre>
 
 
=={{header|Scala}}==
Anonymous user