Remove the Letters ABC

Published by Matt in

Create a function that will remove the letters "a", "b" and "c" from the given string and return the modified version. If the given string does not contain "a", "b", or "c", return nil.

Examples

remove_abc("This might be a bit hard") ➞ "This might e  it hrd"

remove_abc("hello world!") ➞ nil

remove_abc("") ➞ nil

Notes

If the given string does not contain "a", "b", or "c", return nil.

Watch a quick demo on how Edabit works.