Letters Only

Published by Matt in

Write a function that removes any non-letters from a string, returning a well-known film title.

Examples

lettersOnly("R!=:~0o0./c&}9k`60=y") ➞ "Rocky"

lettersOnly("^,]%4B|@56a![0{2m>b1&4i4") ➞ "Bambi"

lettersOnly("^U)6$22>8p).") ➞ "Up"

Notes

See the Resources section for more information on C++ string functions.

Watch a quick demo on how Edabit works.