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

Content added Content deleted
Line 14: Line 14:
procedure stripChars(s,cs)
procedure stripChars(s,cs)
ns := ""
ns := ""
s ? while ns ||:= 2(not pos(0), tab(upto(cs)|0)) do tab(many(cs)))
s ? while ns ||:= (not pos(0), tab(upto(cs)|0)) do tab(many(cs)))
return ns
return ns
end</lang>
end</lang>