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

From Rosetta Code
Content added Content deleted
m (wiki syntax fixes)
Line 4: Line 4:
<lang pseudocode> print stripchars("She was a soul stripper. She took my heart!","aei")
<lang pseudocode> print stripchars("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>

[[Category:String manipulation]]

Revision as of 13:13, 5 June 2011

Strip a set of characters from a string is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

The task is to create a function that strips a set of characters from a string. The function should take two arguments: the first argument being a string to stripped and the second, a string containing the set of characters to be stripped. The returned string should contain the first string, stripped of any characters in the second argument:

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