Jump to content

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

(Added Nemerle)
Line 201:
<lang j> 'She was a soul stripper. She took my heart!' -. 'aei'
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}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.