Exercise 5: Remove Characters from a String
Practice removing certain characters from a string.
We'll cover the following
Problem statement
Skim through the string documentation in the Ruby documentation, and look for a method that removes characters from a string. Using that method, try to delete the input characters from the input string in the exercise below.
Example
input_string = "Ruby is fun"
input_characters = "u"
result = "Rby is fn"
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy