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

Content added Content deleted
(Added Nemerle)
Line 201: Line 201:
<lang j> 'She was a soul stripper. She took my heart!' -. 'aei'
<lang j> 'She was a soul stripper. She took my heart!' -. 'aei'
Sh ws soul strppr. Sh took my hrt!</lang>
Sh ws soul strppr. Sh took my hrt!</lang>
=={{header|Lua}}==
<lang lua>function stripchars( str, chr )
local s = ""
for g in str:gmatch( "[^"..chr.."]" ) do
s = s .. g
end
return s
end

print( stripchars( "She was a soul stripper. She took my heart!", "aei" ) )</lang>


=={{header|Nemerle}}==
=={{header|Nemerle}}==