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"
Try it yourself
def remove_chars(input_string, input_characters)result = ""# Start your code herereturn resultend