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

no edit summary
m ({{omit from|Openscad}})
No edit summary
Line 358:
Concat( "", Split(text, chuck))
}</lang>
 
=={{header|NetRexx}}==
<lang NetRexx>/* NetRexx */
 
options replace format comments java crossref savelog symbols
 
say stripchars("She was a soul stripper. She took my heart!", "aei")
 
return
 
method stripchars(haystack, chs) public static
 
loop c_ = 1 to chs.length
needle = chs.substr(c_, 1)
haystack = haystack.changestr(needle, '')
end c_
 
return haystack
</lang>
 
=={{header|Objective-C}}==
Line 517 ⟶ 536:
>>> stripchars("She was a soul stripper. She took my heart!", "aei")
'Sh ws soul strppr. Sh took my hrt!'</lang>
 
=={{header|REXX}}==
<lang REXX>/* Rexx */
 
Do
Say stripchars("She was a soul stripper. She took my heart!", "aei")
 
Return
End
Exit
 
stripchars:
Procedure
Do
Parse arg haystack, chs
 
Do c_ = 1 to length(chs)
needle = substr(chs, c_, 1)
haystack = changestr(needle, haystack, '')
End c_
 
Return haystack
End
Exit
</lang>
 
=={{header|Ruby}}==
Anonymous user