Anonymous user
Strip a set of characters from a string: Difference between revisions
Strip a set of characters from a string (view source)
Revision as of 16:39, 30 December 2023
, 5 months ago→{{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
var outstr = string
var ch = char
outstr = ""
for i = 1 to
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}}==
|