Remove characters from a string
February 24, 2012
The other day I needed a function to remove characters from a string, and was annoyed when neither R5RS nor the Standard Prelude provided one. Today’s exercise asks you to write that function:
Write a function that takes two strings and removes from the first string any character that appears in the second string. For instance, if the first string is “Programming Praxis” and the second string is “aeiou” the result is “Prgrmmng Prxs”.
Your task is to write the function described above. When you are finished, you are welcome to read or run a suggested solution, or to post your own solution or discuss the exercise in the comments below.
Pages: 1 2